I am trying to deploy an activator app to Heroku. Without an Proc-file Heroku tells me that no cedar app is detected. When i add a Proc file and add
web: ./activator start -Dhttp.port=${PORT}
the startup fails.
How to get it running on Heroku?
UPDATE
The problem was a (not yet needed) package.json. Heroku obviously infered by that file that it is a node.js app. After renaming the app startet without a Proc file. But now i got unresolved dependencies for
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.play#play_2.11;2.3.2: not found
[warn] :: com.typesafe.play#play-jdbc_2.11;2.3.2: not found
[warn] :: com.atlassian.jwt#jwt-core;1.2.3: not found
[warn] :: com.atlassian.jwt#jwt-api;1.2.3: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
and solved that by adding
resolvers += "typesafe" at "http://repo.typesafe.com/typesafe/releases/"
Then I had the problem that we use SASS and it is not supported by Heroku. So I tried to deploy via the sbt plugin. That led to the following problem:
[error] (fashion-advice-common/compile:deployHeroku) You must stage your application before deploying it!
[error] (fashion-advice-customer/compile:deployHeroku) Could not find app ''. Check that herokuAppName setting is correct.
[error] (fashion-advice-stylist/compile:deployHeroku) Could not find app ''. Check that herokuAppName setting is correct.
Perhaps because we use 3 sub modules?
Your Procfile should look more like this:
web: target/universal/stage/bin/name_of_app_repo -Dhttp.port=${PORT}
Source
Related
I am trying to build Apache Nifi -1.7.1 from source, and chose the github tag rel/nifi-1.7.1 to do so.
I am getting build failures on the nifi-hive-processors bundle with various cannot find symbols such as below.
[ERROR]error: cannot find symbol
[ERROR] symbol: class Path
[ERROR] location: class ConvertAvroToORC
Any ideas on which branch/tag is safe to build from source?
This was resolved on the mailing list. Turned out to be a build error that resulted from the organization's local Maven repository. source
I am trying to use React Bootstrap -library having this in my build.sbt
"org.webjars.npm" % "react-bootstrap" % "0.27.2"
This has worked before, but some version dependency must have recently changed, as trying to compile the project now gives following error.
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.webjars.npm#js-tokens;[3.0.0,4),[4.0.0,5): not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.webjars.npm:js-tokens:[3.0.0,4),[4.0.0,5)
[warn] +- org.webjars.npm:loose-envify:[1.0.0,2)
[warn] +- org.webjars.npm:warning:[2.0.0,3)
[warn] +- org.webjars.npm:react-prop-types:[0.3.0,0.4)
[warn] +- org.webjars.npm:react-bootstrap:0.27.2
Trying to add it in Webjars-page says that all versions (4.0.0, 3.0.2, 3.0.1, 3.0.0) have already been added to Maven Central.
Starting Deploy
Got package info for org.webjars.npm js-tokens 4.0.0
Determining dependency graph
No dependencies.
WebJar org.webjars.npm js-tokens 4.0.0 has already been deployed
So my questions are
What does the version syntax js-tokens;[3.0.0,4),[4.0.0,5) mean?
How can I add the required version so that the Scala Play project compiles again?
So searched a bit further (didn't search well enough, apparently).
Syntax js-tokens;[3.0.0,4),[4.0.0,5) means larger than or equal of 3.0.0 but below 4 or larger than or equal of 4.0.0 but below 5, two sets, I think. Someone else can clarify, but that's what I got from https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html :)
Maven Version Range Sets in Transitives Do Not Work. This can be handled currently with this
dependencyOverrides += "org.webjars.npm" % "js-tokens" % "3.0.2"
While running sbt assembly, the command runs for some time and throws the following error on Windows 7:
[warn] Strategy 'discard' was applied to 4 files
[warn] Strategy 'first' was applied to 199 files
[info] Assembly up to date: C:\spark_\spark-1.0.2\assembly\target\scala-2.10\spark-assembly-1.0.2-hadoop1.0.4.jar
sbt.ResolveException: download failed: javax.xml.stream#stax-api;1.0-2!stax-api.jar
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:217)
at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:126)
Any ideas on how to solve this?
In the official documentation of Apache Spark there's the section Downloading that says:
If you’d like to build Spark from scratch, visit building Spark with Maven.
where you can find the command that worked fine for me (just two days ago on Mac OS X with Java 8):
mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.4.0 -DskipTests clean package
p.s. I wish they'd sticked to sbt as the build tool for official releases, though.
running sbt clean before sbt assembly solved the above problem.
I'm trying to get escalante-sbt running but without luck so far. I tried SBT 0.13.1 with Scala 2.10.3. Had the same issue as in this question and nothing worked for me. In my last attempt I cloned an sbt-escalante example but not even this is working.
[info] Resolving org.scala-sbt#sbt-launch;0.13.1 ...
[warn] [NOT FOUND ] org.apache.maven.wagon#wagon-provider-api;1.0!wagon-provider-api.jar (1794ms)
[warn] ==== JBoss repository: tried
[warn] http://repository.jboss.org/nexus/content/groups/public/org/apache/maven/wagon/wagon-provider-api/1.0/wagon-provider-api-1.0.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.maven.wagon#wagon-provider-api;1.0!wagon-provider-api.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: org.apache.maven.wagon#wagon-provider-api;1.0!wagon-provider-api.jar
I would really like to get sbt-escalante working but I'm out of ideas. What is left to try?
I've never worked with the Escalante SBT plugin so please excuse mistakes. The following seemed to work for me.
project/build.properties
sbt.version=0.13.2-M3
project/sbt-escalante.sbt (I thought I'd change the official *.scala approach to *.sbt)
resolvers ++= Seq(
"JBoss repository" at "http://repository.jboss.org/nexus/content/groups/public/",
"Project Odd repository" at "http://repository-projectodd.forge.cloudbees.com/upstream/"
)
lazy val plugins = project in file(".") dependsOn(sbtEscalante)
lazy val sbtEscalante = uri("git://github.com/escalante/sbt-escalante.git#0.2.0")
build.sbt
import io.escalante.sbt.EscalantePlugin._
escalanteSettings
With the files in place, I could run escalante-version and hence assumed it worked fine.
[sbt-escalante]> escalante-version
[info] 0.3.0
I have a Play 2.1-SNAPSHOT based application that runs fine locally but when I try to deploy to Heroku I get the following error:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: play#sbt-plugin;2.1-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested
attributes.
My plugins.sbt file points to a local repository containing the 2.1-SNAPSHOT dependencies:
resolvers ++= Seq(
"Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
Resolver.file("My Repository", file( "repository/local") )
)
// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.1-SNAPSHOT")
The directory "repository/local" is checked into my GIT repository. It does look like SBT on Heroku is looking in the local repository since before the "Unresolved Dependency" error I see the following warnings:
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.9.1_0.11.2/2.1-SNAPSHOT/sbt-plugin-2.1-SNAPSHOT.pom
[warn] ==== My Repository: tried
[warn] ==== heroku-sbt-typesafe: tried
[warn] ==== heroku-central: tried
Running the command "play stage" locally finishes successfully.
An alternative is to add the Typesafe ivy-snapshots repository as a plugin resolver if you'd prefer to not use a local file repo.
In project/plugins.sbt:
resolvers += Resolver.url("Typesafe Ivy Snapshots", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns)
Found the issue. I needed to declare "My Repository" as an Ivy repository by adding "Resolver.ivyStylePatterns" after the file resolver like this:
Resolver.file("My Repository", file( "repository/local/") )(Resolver.ivyStylePatterns)
The http://repo.typesafe.com/typesafe/ivy-snapshots/ seems no longer active, the following configuration works for me:
in your plugins.sbt:
//play sbt-plugin snapshot
resolvers += Resolver.url("Typesafe Simple Snapshots", url("https://repo.typesafe.com/typesafe/simple/snapshots/"))(Resolver.ivyStylePatterns)
//play snapshot
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
// The Play plugin
addSbtPlugin("com.typesafe.play" %% "sbt-plugin" % "2.4-SNAPSHOT")
in your build.sbt
//play snapshot
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"