Status: Closed (View Workflow)
Resolution: Out of Date
Affects Version/s: None
Fix Version/s: 2.0.0-alpha-1
JBoss AS 7.1.1.Final
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
Linux ayaki.localdomain 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
ShrinkWrap's Maven Dependency Resolver doesn't successfully resolve artifacts that're specified with an implicit version in their co-ordinates, even if that version can be determined from a loaded pom.xml . This forces duplication of version listings between tests and the project pom, leading to greater maintenance burden and the increased probability of tests not reflecting the real code that gets run.
Tested with "org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar:1.0.0-beta-6" as depended on by Arquillian 1.0.0.Final via "org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.0.0". Re-tested with resolver 2.0.0-alpha-1, issue remains.
should, if some-group:some-artifact is defined in pom.xml via a direct dependency, dependencyManagement section, parent pom, or a <type>import</type> pom in dependencyManagement, then it should be able to figure out the version without it being specified, eg:
... or even better, the artifact should be resolved from a class reference by looking up the artifact, so you can write something like the imaginary:
as suggested in https://issues.jboss.org/browse/ARQ-412 . This can't wholly replace specification by artifact co-ordinates, as not all artifacts necessarily contain Java classes, and it may also be desirable to bundle artifacts that aren't in <test/> scope so their classes can't be referenced directly in the tests.
Note that importing dependencies from the target's pom wholesale succeeds, but offers no control over which dependencies are pulled in so you can't test with a subset, a particular profile, etc.
Possibly related to https://issues.jboss.org/browse/ARQ-412