Property in pom's version field results to wrong dependency resolution #647
(I'm going to edit this report so it's easier to review it @eed3si9n)
Create the following directory structure:
name := "sbtpomtest" organization := "com.example" version := "0.1-SNAPSHOT" libraryDependencies ++= Seq( "org.jboss.shrinkwrap" % "shrinkwrap-api" % "1.0.1", "org.jboss.shrinkwrap" % "shrinkwrap-impl-base" % "1.0.1", "io.escalante" % "escalante-dist" % "0.2.0" artifacts(Artifact("escalante-dist", "zip", "zip")), "org.jboss.as" % "jboss-as-arquillian-container-embedded" % "7.x.incremental.546", "org.jboss.arquillian.core" % "arquillian-core-api" % "1.0.3.Final", "org.jboss.arquillian.core" % "arquillian-core-spi" % "1.0.3.Final", "org.jboss.arquillian.core" % "arquillian-core-impl-base" % "1.0.3.Final", "org.jboss.arquillian.container" % "arquillian-container-spi" % "1.0.3.Final", "org.jboss.arquillian.container" % "arquillian-container-impl-base" % "1.0.3.Final", "org.jboss.arquillian.test" % "arquillian-test-impl-base" % "1.0.3.Final", "org.yaml" % "snakeyaml" % "1.8" ) resolvers ++= Seq( "JBoss repository" at "http://repository.jboss.org/nexus/content/groups/public/", "Project Odd repository" at "http://repository-projectodd.forge.cloudbees.com/upstream/" )
(The script needs to be changed depending on where your jar,
result (as of 12/2/2013 using sbt 0.13)
original bug report (was "Wrong dependency version resolution leading to build halt")
Hi, as a result #646 I've nuked my
I think this is a problem where the dependency version to use for this dependency is not correctly calculated (not my lucky day today...). Let me explain:
Looking at the debug log I see: https://gist.github.com/4564402
That Shrinkwrap dependency comes from org.jboss.arquillian.config#arquillian-config-impl-base;1.0.3.Final dependency. The pom for this dependency is:
This dependency's version should be resolved checking the parent, which is:
This build parent defines:
And that references:
Where project.version=2.0.0-alpha-3, so that should resolve in:
What is going on here? Is this an SBT or ivy issue?
The text was updated successfully, but these errors were encountered:
Btw, my dependencies are:
Actually, this was happening after clearing the cache and trying to build a project that used the plugin. I tried building the plugin, which has those dependencies I mentioned, first and it worked fine (it resolved the right dependency). I then built with the project again and it worked fine. Very odd.
This has appeared again: https://groups.google.com/forum/?fromgroups=#!topic/liftweb/H-WR48BojSc
A way to recreate this issue is the following:
^ That should fail with a dependency resolution bug.
In my response to the liftweb topic, I explained a workaround I used to solve the issue which literally involves building the Escalante SBT plugin from scratch, which resolves the dependency correctly, then build one of the Escalante Quickstarts.
Even with the workaround, the issue still appears under certain circumstances, see http://stackoverflow.com/questions/15351171/escalante-sbt-plugin-does-not-find-org-jboss-shrinkwrap-descriptorsshrinkwrap-d :((
Please find reproduced case at https://github.com/arashi01/sbt-issue-647-reproduction. The
Tested with sbt 0.13.5-M2
* Here we wire Aether into the Ivy dependency chain * Add hooks into Aether to use Ivy's http library (so credentials are configured the same) * Create the actual Resolver which extracts metadata information from Aether * Deprecate old Ivy-Maven integrations * Create hooks in existing Resolver facilities to expose a flag to enable the new behavior. * Create notes documenting the feature. * Create a new resolver type `MavenCache` which denotes how to read/write local maven cache metadata correctly. We use this type for publishM2 and mavenLocal. * Update failing -SNAPSHOT related tests to use new Aether resolver * Create specification for expected behavior from the new resolvers. Known to fix #1322, #321, #647, #1616