[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-103) Maven resolver unable to resolve dependencies with explicit version
jay shaughnessy (JIRA)
jira-events at lists.jboss.org
Fri Jan 18 10:01:22 EST 2013
[ https://issues.jboss.org/browse/SHRINKRES-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748942#comment-12748942 ]
jay shaughnessy commented on SHRINKRES-103:
-------------------------------------------
Karel, confirming that this is fixed in alpha-7, thanks!
> Maven resolver unable to resolve dependencies with explicit version
> -------------------------------------------------------------------
>
> Key: SHRINKRES-103
> URL: https://issues.jboss.org/browse/SHRINKRES-103
> Project: ShrinkWrap Resolvers
> Issue Type: Bug
> Components: impl-maven
> Affects Versions: 2.0.0-alpha-6
> Environment: Win7, Maven 3.0.4, Java7
> Reporter: jay shaughnessy
> Assignee: Karel Piwko
> Priority: Critical
> Fix For: 2.0.0-alpha-7
>
>
> Actual version: 2.0.0-alpha-6 (not in the version drop down)
> 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>org.powermock</groupId>
> <artifactId>powermock-api-mockito</artifactId>
> <version>${powermock.version}</version>
> <scope>test</scope>
> </dependency>
> ...
> </dependencies>
> And the following SW-2 code:
> MavenResolverSystem resolver = Maven.resolver();
> resolver.loadPomFromFile("pom.xml").resolve("org.powermock:powermock-api-mockito").withTransitivity().as(JavaArchive.class)
> I get the follwoing exception:
> org.jboss.shrinkwrap.resolver.api.ResolutionException: Unable to get version for dependency specified by org.powermock:powermock-api-mockito, it was not provided in <dependencyManagement> section.
> Again, this worked for me in SW-1.
> If I do in fact create a <dependencyManagement> section in the pom, and define the version there, it works as a workaround. But it would seem that an explicit <version> element in the <dependency> should be sufficient.
--
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