[
https://issues.jboss.org/browse/SHRINKRES-113?page=com.atlassian.jira.plu...
]
Karel Piwko commented on SHRINKRES-113:
---------------------------------------
The pattern "groupId:artifactId:jar:classifier" will always hit classifier as a
version. If you need to specify classifier and let it resolve the version from pom, do the
following:
{code}
resolve("groupId:artifactId:jar:classifier:?")
{code}
resolving of maven artifacts with classifier failed
---------------------------------------------------
Key: SHRINKRES-113
URL:
https://issues.jboss.org/browse/SHRINKRES-113
Project: ShrinkWrap Resolvers
Issue Type: Feature Request
Components: api-maven
Affects Versions: 2.0.0-beta-2
Reporter: Juergen Biersack
Assignee: Michal Matloka
The following code is not working:
{code:title=ArquillianTest.java|borderStyle=solid}
@Deployment
public static EnterpriseArchive createDeployment() {
...
JavaArchive[] ejbModule = mavenResolver
.resolve("groupId:artifactId:jar:classifier")
.withoutTransitivity()
.as(JavaArchive.class);
...
}
{code}
The class org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenCoordinates should be
able to interprete the coordinate above with the documented pattern:
*<groupId>:<artifactId>[:<packagingType>[:<classifier>]][:<version>]*
It seems, that the classifier is interpreted as version.
The following workaround is running well:
{code:title=ArquillianTest.java|borderStyle=solid}
@Deployment
public static EnterpriseArchive createDeployment() {
...
JavaArchive[] warDependenciesClientViews = mavenResolver
.addDependency(
MavenDependencies.createDependency(
MavenCoordinates.createCoordinate(
"groupId",
"artifactId",
null,
PackagingType.JAR,
"classifier"),
null,
false))
.resolve()
.withoutTransitivity()
.as(JavaArchive.class);
...
}
{code}
--
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