[JBoss JIRA] (SHRINKRES-113) resolving of maven artifacts with classifier failed
by Juergen Biersack (JIRA)
[ https://issues.jboss.org/browse/SHRINKRES-113?page=com.atlassian.jira.plu... ]
Juergen Biersack updated SHRINKRES-113:
---------------------------------------
Description:
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}
> 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: Andrew Rubinger
>
> 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