heroku / heroku-sbt-plugin

An sbt plugin for deploying Heroku Scala applications
MIT License
111 stars 17 forks source link

deploy multi scala projects #23

Closed ziboumima closed 9 years ago

ziboumima commented 9 years ago

Hello, I'm using sbt 0.13.7 and sbt-heroku 0.4.1 to deploy my scala play project to Heroku. The strange thing is that I can deploy the principal project but not the child project (I have 3 projects to be deployed in 3 different servers) Another strange thing is, my team mate uses the same configuration and he can deploy the project without any problem Here's my output: activator deployHeroku -Dapp=myapp

[warn] Scala version was updated by one of library dependencies: [warn] * org.scala-lang:scala-library:(2.11.1, 2.11.6, 2.11.0, 2.11.2, 2.11.4) -> 2.11.7 [warn] To force scalaVersion, add the following: [warn] ivyScala := ivyScala.value map { .copy(overrideScalaVersion = true) } [warn] Run 'evicted' to see detailed eviction warnings [info] Updating {file:/home/nam/workspace/lng-webserver/}excel-api... [info] Resolving jline#jline;2.12.1 ... [info] Done updating. [warn] Scala version was updated by one of library dependencies: [warn] * org.scala-lang:scala-library:(2.11.1, 2.11.6, 2.11.0, 2.11.2, 2.11.4) -> 2.11.7 [warn] To force scalaVersion, add the following: [warn] ivyScala := ivyScala.value map { .copy(overrideScalaVersion = true) } [warn] Run 'evicted' to see detailed eviction warnings [info] Wrote /home/nam/workspace/lng-webserver/woopra/target/scala-2.11/woopra_2.11-1.0-SNAPSHOT.pom [info] Wrote /home/nam/workspace/lng-webserver/userLogin/target/scala-2.11/userlogin_2.11-1.0-SNAPSHOT.pom [info] Wrote /home/nam/workspace/lng-webserver/esCommon/target/scala-2.11/escommon_2.11-1.0-SNAPSHOT.pom [success] Total time: 5 s, completed Sep 1, 2015 9:48:26 AM

The output said "success" but no jar is sent to the server. I can't understand this behavior, please help me for this problem. Thanks

jkutner commented 9 years ago

@hibou107 without seeing your build.sbt it's really difficult to say what's going on. I recommend giving the latest version of sbt-heroku (0.5.1) a try. If that does not work, please open a ticket with Heroku Support so we can better assist you.

ziboumima commented 9 years ago

@jkakar Thanks for your answer. I've already tried the latest version of heroku-sbt but I had the same problem

This is my build.sbt

scalacOptions ++= Seq("-Xmax-classfile-name", "254")

scalacOptions ++= Seq("-unchecked", "-deprecation","-feature")

scalacOptions ++= Seq("-Xlint") //generate warning of type Adapting argument list due to Slik implementation of sql interpolation should be fixe in the next version of slick

herokuJdkVersion in Compile := "1.8"

//@see devcenter.heroku.com/articles/deploying-scala-and-play-applications-with-the-heroku-sbt-plugin herokuAppName in Compile := Map( "test" -> "lng-test-frontend", "staging" -> "lng-staging", "staging-data" -> "lng-staging-data", "prod" -> "kpler" ).getOrElse(sys.props("app"), sys.props.getOrElse("app", ""))

herokuProcessTypes in Compile := Map( "web" -> "target/universal/stage/bin/lng-webserver -Dhttp.port=${PORT}"

This is my excel-api/built.sbt file

herokuJdkVersion in Compile := "1.8"

herokuAppName in Compile := Map( "test" -> "excel-kpler-test", "prod" -> "excel-kpler" ).getOrElse(sys.props("app"), sys.props.getOrElse("app", ""))

herokuProcessTypes in Compile := Map( "web" -> "target/universal/stage/bin/excel-api -Dhttp.port=${PORT}" //-J-javaagent:/app/newrelic/newrelic.jar -J-Dnewrelic.config.file=/app/target/universal/stage/conf/newrelic.yml" )

Please tell me if you find anything unusual, because my team mate uses the same configuration file and he succeed

Thanks

jkutner commented 9 years ago

This line doesn't look right, but maybe I need more context:

).getOrElse(sys.props("app"), sys.props.getOrElse("app", ""))

Do you have an "app" system property set somewhere? does your colleague?

EDIT

I see you have -Dapp=myapp in the command. Is that your app name? Doesn't seem like it :)

ziboumima commented 9 years ago

@jkakar Thanks for your answer and time. Yes I use -Dapp=myapp And myapp is the name of my Heroku instance Do you have any clue about this problem ? Thanks

jkutner commented 9 years ago

I doubt that "myapp" is the name of your Heroku app. Can you double check that? Try running heroku apps:info -a myapp. Since we're talking about specific app names, I think you should move this conversation to http://help.heroku.com

ziboumima commented 9 years ago

Hi, This is the output of the command

Git Url: git@heroku.com:excel-gas-test.git Web Url: https://excel-gas-test.herokuapp.com/ Collaborators: ld Dynos: {} Owner: nng Region: eu Repo Size: 0 B Slug Size: 0 B

jkutner commented 9 years ago

So the name of your app is "excel-gas-test". You can see this at http://dashboard.heroku.com. I'm not sure why the -a myapp is ignored. Are you on Windows?

Trying using "excel-gas-test" when you deploy your app. But if you are deploying multiple apps you will need multiple heorku apps. Make sure you have all of those create and configured correctly.

ziboumima commented 9 years ago

@jkakar : I've found the problem. I need to create the empty folder "project" inside my sub project