Deploying 2.1-SNAPSHOT on Heroku

I have a Play 2.1-SNAPSHOT-based application that works fine locally, but when I try to install it on 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 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 repository / local directory is checked in my GIT repository. This is similar to SBT on Heroku, which is looking in the local repository, because before the error "Unresolved Dependency" 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 

The execution of the "playback step" locally completes successfully.

+6
source share
3 answers

Problem detected. I needed to declare "My repository" as an Ivy repository, adding "Resolver.ivyStylePatterns" after this file was converted as follows:

 Resolver.file("My Repository", file( "repository/local/") )(Resolver.ivyStylePatterns) 
+6
source

An alternative is to add the Typesafe ivy-snapshots repository as a plugin converter if you prefer not to use a local repo file.

In the /plugins.sbt project:

 resolvers += Resolver.url("Typesafe Ivy Snapshots", url("http://repo.typesafe.com/typesafe/ivy-snapshots/"))(Resolver.ivyStylePatterns) 
+8
source

http://repo.typesafe.com/typesafe/ivy-snapshots/ seems more inactive, the following configuration works for me:

in plugins.sbt file:

 //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 the build.sbt file

 //play snapshot resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/" 
0
source

Source: https://habr.com/ru/post/915950/


All Articles