SBT unresolved dependency: com.paypal.sdk#paypal-core;LATEST - maven

I have a play framework 2.3.10 project and it can't find a paypal dependency. I suspect that it's due to the LATEST version tag (maybe it's a maven special version tag not supported by SBT?).
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.paypal.sdk#paypal-core;LATEST: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.paypal.sdk#paypal-core;LATEST: not found
We're not including this version directly, but it's a dependency of another dependency: com.paypal.sdk#merchantsdk;2.13.117.
Do you know how to solve this? Should we exclude the LATEST version and include a specific one (how?), or is there a way to include that LATEST dependency?
Thank you

I excluded core dependency from merchant and manually added core with the latest version.
"com.paypal.sdk" % "merchantsdk" % "2.14.117" exclude ("com.paypal.sdk","paypal-core"),
"com.paypal.sdk" % "paypal-core" % "1.7.0",

Related

Unresolved Webjars dependency even though it seems to be in Maven Central

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"

Play 2.2.2 / com.typesafe.play#play_2.10;2.2.2: not found on Heroku

All works well with Play 2.2.1.
However, when upgrading to Play 2.2.2 and deploying to Heroku, process warns about:
sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.10;2.2.2: not found
unresolved dependency: com.typesafe.play#play-cache_2.10;2.2.2: not found
unresolved dependency: com.typesafe.play#filters-helpers_2.10;2.2.2: not found
unresolved dependency: com.typesafe.play#play-test_2.10;2.2.2: not found
unresolved dependency: com.typesafe.play#play-docs_2.10;2.2.2: not found
I don't figure out why..I just updated the plugins.sbt to:
// Comment to get more information during initialization
logLevel := Level.Warn
// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.2") //just added 2.2.2 instead of 2.2.1
and upgraded sbt to 0.13.0.
Shouldn't this dependency be downloaded without explicit set on the Build.scala?
Ok so I managed to do the trick by adding this line, before my series of resolvers +=:
resolvers := Seq("typesafe" at "http://repo.typesafe.com/typesafe/releases/")
If it can help some people coming across the same issue :)

Escalante sbt plugin fails with missing org.apache.maven.wagon#wagon-provider-api;1.0!wagon-provider-api.jar

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

Unresolved Dependencies Grails 2.3

I am unable to run my Grails app because of a dependency problem. BuildConfig.groovy is set to use Maven Central which has the dependencies that Grails cannot find. Any idea why?
This is a project which I only just upgraded to Grails 2.3, if that matters.
Loading Grails 2.3.0
Dependency resolver grailsPlugins already defined. Ignoring...
Dependency resolver grailsHome already defined. Ignoring...
| Configuring classpath
:: problems summary ::
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: log4j#log4j;1.2.17: configuration not found in log4j#log4j;1.2.17: 'master'. It was required from org.grails.internal#manage;1301 runtime
:: org.jboss.netty#netty;3.2.5.Final: configuration not found in org.jboss.netty#netty;3.2.5.Final: 'compile'. It was required from com.mycompany.event#commons;35.9 compile
:: org.springframework#spring-test;3.2.4.RELEASE: configuration not found in org.springframework#spring-test;3.2.4.RELEASE: 'compile'. It was required from org.grails#grails-plugin-testing;2.3.0 compile
::::::::::::::::::::::::::::::::::::::::::::::
| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- log4j:log4j:1.2.17
- org.jboss.netty:netty:3.2.5.Final
- org.springframework:spring-test:3.2.4.RELEASE
(Use --stacktrace to see the full trace)
:: problems summary ::
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: log4j#log4j;1.2.17: configuration not found in log4j#log4j;1.2.17: 'master'. It was required from org.grails.internal#manage;1301 runtime
:: org.jboss.netty#netty;3.2.5.Final: configuration not found in org.jboss.netty#netty;3.2.5.Final: 'compile'. It was required from com.mycompany.event#commons;35.9 compile
::::::::::::::::::::::::::::::::::::::::::::::
| Error Resolve error obtaining dependencies: Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- log4j:log4j:1.2.17
- org.jboss.netty:netty:3.2.5.Final
(Use --stacktrace to see the full trace)
| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):
- log4j:log4j:1.2.17
- org.jboss.netty:netty:3.2.5.Final
| Run 'grails dependency-report' for further information.
How do I get Grails to find these dependencies?
Thanks!
Most probably you are facing this issue because of old version of spring-test transitive dependency by plugins or any other dependency.
You need to exclude spring-test as mentioned here in the upgrade guide
As suggested by the app, running a dependency-report will be the best bet to find out conflicts and missing dependencies.

Deploying Play 2.1-SNAPSHOT based application to Heroku

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/"

Resources