[ 
http://jira.codehaus.org/browse/MJAR-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106345
 ] 

William Ferguson commented on MJAR-83:
--------------------------------------

The workaround for this is to
* List all deps with a scope of compile
* Execute *mvn* *compiler:compile* *jar:jar*

Neither of is nice and both of which is required.

NB I forgot to say why we need to create a Jar with no content other than a 
manifest classpath.
Its because the Windows line length limit precludes classpaths that are too 
long, so we generate a Jar with a manifest classpath that includes all the 
target libraries and just include it.

But its seems like a problem in the general sense in any case.

> addClasspath is not respected for runtime dependencies
> ------------------------------------------------------
>
>                 Key: MJAR-83
>                 URL: http://jira.codehaus.org/browse/MJAR-83
>             Project: Maven 2.x Jar Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1, 2.2
>            Reporter: William Ferguson
>         Attachments: pom.xml
>
>
> maven-jar-plugin does not resolve dependencies itself, so specifying
> {code}
>       <configuration>
>               <archive>
>                       <manifest>
>                               <addClasspath>true</addClasspath>
>                       </manifest>
>               </archive>
>       </configuration>
> {code}
> will add no dependencies for 
> {noformat}
>       mvn jar:jar
> {noformat}
> And even
> {noformat}
>       mvn compiler:compile jar:jar
> {noformat}
> will only add compile time dependencies, not runtime dependencies, presumably 
> because the maven-compiler-plugin causes resolution of the compile time 
> dependencies.
> See the attached POM.
> There is *no* manifest classpath generated by
> {noformat}
>       mvn jar:jar
> {noformat}
> The manifest classpath generated by
> {noformat}
>       mvn compiler:compile jar:jar
> {noformat}
> only contains commons-codec which is the compile time dependency.
> There needs to be a way to add runtime dependences to the manifest classpath 
> of the jar.
> And preferably not requiring some other plugin to resolve the dependencies 
> first.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to