[
https://issues.jboss.org/browse/SHRINKRES-102?page=com.atlassian.jira.plu...
]
Karel Piwko edited comment on SHRINKRES-102 at 1/13/13 4:59 AM:
----------------------------------------------------------------
Hi Jay,
I wrote a few tests and figured out that it is working correctly for dependencies
available in a remote repository.
I added possibility to resolve these artifacts directly from workspace (classpath).
was (Author: kpiwko):
Hi Jay,
I wrote a few tests and figured out that it is working correctly for dependencies not
resolved from reactor, but available in a remote repository. So I added possibility to
resolve these artifacts directly from workspace (classpath).
Maven resolver unable to resolve test-jar dependency
----------------------------------------------------
Key: SHRINKRES-102
URL:
https://issues.jboss.org/browse/SHRINKRES-102
Project: ShrinkWrap Resolvers
Issue Type: Bug
Affects Versions: 2.0.0-alpha-6
Environment: Win7, Maven 3.0.4, Java7
Reporter: jay shaughnessy
Assignee: Karel Piwko
A possible regression as similar code, using the old API, worked for me with
Shrinkwrap-1.
Example: given the following dependency in the local pom.xml:
<dependencies>
...
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rhq-core-client-api</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
...
</dependencies>
And the following SW-2 code:
MavenResolverSystem resolver = Maven.resolver();
resolver.loadPomFromFile("pom.xml").resolve("org.rhq:rhq-core-client-api:jar:tests:4.6.0-SNAPSHOT).withTransitivity().as(JavaArchive.class)
I don't get an exception but the retuened Archive is the production jar:
rhq-core-client-api-4.6.0-SNAPSHOT.jar
As opposed to the expected test jar:
rhq-core-client-api-4.6.0-SNAPSHOT-tests.jar
The test jar is generated by us in that module's pom, using the maven-jar plugin with
phase=package and goal=test-jar, which I believe is the standard mechanism. And both of
the jars are available in my M2 repo in the same place
(.m2/repository/org/rhq/rhq-core-client-api/4.6.0-SNAPSHOT).
At the moment I have not been able to find a workaround.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira