Last active
August 29, 2015 14:07
-
-
Save seratch/82a2b576bc4e95973e55 to your computer and use it in GitHub Desktop.
Stuck to use sbt-heroku in Skinny Apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/project/Build.scala b/project/Build.scala | |
| index 87a595e..6c5a150 100644 | |
| --- a/project/Build.scala | |
| +++ b/project/Build.scala | |
| @@ -8,6 +8,8 @@ import com.earldouglas.xsbtwebplugin.WebPlugin._ | |
| import ScalateKeys._ | |
| import scala.language.postfixOps | |
| import org.sbtidea.SbtIdeaPlugin._ | |
| +import com.heroku.sbt.HerokuPlugin | |
| +import com.typesafe.sbt.SbtNativePackager._ | |
| object SkinnyAppBuild extends Build { | |
| @@ -25,6 +27,8 @@ object SkinnyAppBuild extends Build { | |
| val jettyVersion = "9.2.1.v20140609" // latest: "9.2.3.v20140905" | |
| lazy val baseSettings = ScalatraPlugin.scalatraWithJRebel ++ herokuSettings ++ Seq( | |
| + HerokuPlugin.autoImport.herokuAppName in Compile := "skinny-example", | |
| + HerokuPlugin.autoImport.herokuProcessTypes in Compile := Map("web" -> "heroku/stage"), | |
| organization := appOrganization, | |
| name := appName, | |
| version := appVersion, | |
| @@ -139,15 +143,16 @@ object SkinnyAppBuild extends Build { | |
| libraryDependencies += "org.skinny-framework" %% "skinny-standalone" % skinnyVersion, | |
| ideaIgnoreModule := true | |
| ) ++ jettyOrbitHack | |
| - ) | |
| + ).enablePlugins(HerokuPlugin) | |
| // ------------------------------------------------------- | |
| // Deployment on Heroku | |
| // ------------------------------------------------------- | |
| // Run "./skinny heroku:init" | |
| - lazy val stage = taskKey[Unit]("Dummy stage task to keep Heroku happy") | |
| - lazy val herokuSettings = Seq(stage := { "heroku/stage" ! }) | |
| + //lazy val stage = taskKey[Unit]("Dummy stage task to keep Heroku happy") | |
| + //lazy val herokuSettings = Seq(stage := { "heroku/stage" ! }) | |
| + lazy val herokuSettings = packageArchetype.java_application | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sbt build/stage build/deployHeroku | |
| ... | |
| [info] ---> Packaging application... | |
| [info] - app: skinny-example | |
| java.lang.IndexOutOfBoundsException: 0 | |
| at scala.collection.mutable.ResizableArray$class.apply(ResizableArray.scala:43) | |
| at scala.collection.mutable.ArrayBuffer.apply(ArrayBuffer.scala:47) | |
| at com.heroku.sbt.Deploy$.buildUniversalSlug(Deploy.scala:177) | |
| at com.heroku.sbt.Deploy$.buildSlug(Deploy.scala:148) | |
| at com.heroku.sbt.Deploy$.apply(Deploy.scala:73) | |
| at com.heroku.sbt.DeployBuilder.deploy(Deploy.scala:49) | |
| at com.heroku.sbt.HerokuPlugin$autoImport$$anonfun$baseHerokuSettings$1.apply(HerokuPlugin.scala:33) | |
| at com.heroku.sbt.HerokuPlugin$autoImport$$anonfun$baseHerokuSettings$1.apply(HerokuPlugin.scala:19) | |
| at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47) | |
| at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40) | |
| at sbt.std.Transform$$anon$4.work(System.scala:63) | |
| at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) | |
| at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226) | |
| at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17) | |
| at sbt.Execute.work(Execute.scala:235) | |
| at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) | |
| at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226) | |
| at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159) | |
| at sbt.CompletionService$$anon$2.call(CompletionService.scala:28) | |
| at java.util.concurrent.FutureTask.run(FutureTask.java:266) | |
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) | |
| at java.util.concurrent.FutureTask.run(FutureTask.java:266) | |
| at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) | |
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) | |
| at java.lang.Thread.run(Thread.java:744) | |
| [error] (build/compile:deployHeroku) java.lang.IndexOutOfBoundsException: 0 | |
| [error] Total time: 85 s, completed Oct 13, 2014 5:21:13 PM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment