[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-102) Maven resolver unable to resolve test-jar dependency

jay shaughnessy (JIRA) jira-events at lists.jboss.org
Fri Jan 18 09:59:21 EST 2013


    [ https://issues.jboss.org/browse/SHRINKRES-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748941#comment-12748941 ] 

jay shaughnessy commented on SHRINKRES-102:
-------------------------------------------

Karel, confirming that this is fixed in alpha-7, thanks!
                
> 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
>             Fix For: 2.0.0-alpha-7
>
>
> 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


More information about the shrinkwrap-issues mailing list