[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-149) Maven classpathworkspace resolver shouldn't assume classes are under target/classes

Andrew Rubinger (JIRA) jira-events at lists.jboss.org
Tue Sep 3 06:05:03 EDT 2013


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

Andrew Rubinger commented on SHRINKRES-149:
-------------------------------------------

Correct, the hardcoded "classes" and "test-classes" directories need to be externalized and configurable.  Same holds true for the "pom.xml" assumption in that code block.  Let's hear some sensible proposals before we delve into fixing it.  Compelling ideas, team?  [~m_baechler] feel free to weigh in; what approach do you believe would work well?
                
> Maven classpathworkspace resolver shouldn't assume classes are under target/classes
> -----------------------------------------------------------------------------------
>
>                 Key: SHRINKRES-149
>                 URL: https://issues.jboss.org/browse/SHRINKRES-149
>             Project: ShrinkWrap Resolvers
>          Issue Type: Feature Request
>    Affects Versions: 2.0.0
>            Reporter: Matthieu Baechler
>            Assignee: Andrew Rubinger
>
> To avoid conflicting builds between Maven and Eclipse, I put eclipse build into a "eclipse-build/classes" directory.
> Considering this configuration, with the following code :
> {code:java}
>  Maven.resolver()
> 				.offline()
> 				.loadPomFromFile("../../pom.xml")
> 				.resolve("com.linagora.obm:services-module:2.6.0-SNAPSHOT")
> 				.withClassPathResolution(true)
> 				.withTransitivity()
> 				.asFile();
> {code}
> Maven resolver find my services-module on the classpath, but when trying a build a jar, it fails in MavenResolvedArtifactImpl.artifactToFile :
> {code:java}
>  // SHRINKRES-102, allow test classes to be packaged as well
>             File root = new File(artifact.getFile().getParentFile(), "target/classes");
> {code}
> In my case, target/classes contains maven build result and not what's on the classpath.
> Can this resolver use the classes on the classpath instead ?

--
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