Have you looked at jarjar ? 

http://code.google.com/p/jarjar/

Most of the docs show ANT usage, but I think you can use it in maven...

http://www.mvnrepository.com/artifact/com.tonicsystems/jarjar

Of course, I'd love to give you an example, but can't since I haven't
used it. Perhaps someone with experience using it can chime in?

-Wes

On Mon, 2008-08-18 at 19:35 -0700, sairndain wrote:
> (Please pardon for my weakness on Maven2 terminology)
> 
> What I want to do is create a java application jar that also includes other
> "jar" files that are required in its application's classpath....
> 
> 
> When I use the following plugin combination in my project pom...
> i.e., 
> -
> -
> -
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-compiler-plugin</artifactId>
>     <configuration>
>         <source>1.5</source>
>         <target>1.5</target>
>     </configuration>
> </plugin>
> 
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-jar-plugin</artifactId>
>     <configuration>
>     <archive>
>         <index>true</index>
>         <manifest>
>             <addClasspath>true</addClasspath>
>         </manifest>
>     </archive>
>     </configuration>
> </plugin>
> -
> -
> -
> 
> ...the result contains classes, etc... But, not any of the supporting jars I
> need to run this application from the command line:
> 
> test\META-INF
> test\test
> test\testws.wsdl
> test\testws.xsd
> test\META-INF\INDEX.LIST
> test\META-INF\MANIFEST.MF
> test\META-INF\maven
> test\META-INF\maven\test.web.service
> test\META-INF\maven\test.web.service\testwsClient
> test\META-INF\maven\test.web.service\testwsClient\pom.properties
> test\META-INF\maven\test.web.service\testwsClient\pom.xml
> test\test\web
> test\test\web\service
> test\test\web\service\client
> test\test\web\service\testws
> test\test\web\service\client\TestwsClient.class
> test\test\web\service\testws\ObjectFactory.class
> test\test\web\service\testws\package-info.class
> test\test\web\service\testws\RequestType.class
> test\test\web\service\testws\ResponseType.class
> test\test\web\service\testws\Testws.class
> test\test\web\service\testws\TestwsOp.class
> test\test\web\service\testws\TestwsOpResponse.class
> test\test\web\service\testws\TestwsType.class
> test\test\web\service\testws\Testws_Service.class
> 
> 
> Ideally I'd like to have the dependent jars that are listed in the
> application's manifest "classpath" included inside of the application's
> jar...i.e. here is the manifest.mf --- note the jars in the classpath:
> 
> Manifest-Version: 1.0
> Archiver-Version: Plexus Archiver
> Created-By: Apache Maven
> Built-By: dusty
> Build-Jdk: 1.5.0_14
> Class-Path: jaxws-rt-2.1.jar jaxws-api-2.1.jar jaxb-api-2.1.jar stax-a
>  pi-1.0.jar activation-1.1.jar saaj-api-1.3.jar jsr250-api-1.0.jar jsr
>  181-api-1.0-MR1.jar jaxb-impl-2.1.2.jar saaj-impl-1.3.jar streambuffe
>  r-0.4.jar sjsxp-1.0.jar stax-ex-1.0.jar
> 
> 
> If the application jar contains the "dependency" jars, then, I can run the
> application from the command line...  something like this:
> java -classpath ".;testwsClient.jar" test.web.service.client.TestwsClient
> 
> Any help appreciated!!!
> 
> P.S.
> 
> I've looked at some of the documentation on the "build-helper-maven-plugin".  
>  
> 
> I'm not certain whether this is the plugin I want to use.   But, even if it
> is, it is still not clear -- from the "pieces" of examples I've found --
> where the plugin should be positioned in the pom....i.e., before the
> maven-jar-plugin(?)...after(?)...  And it is not clear whether I would have
> to explicitly list the dependent jars (listed in my manifest.mf classpath),
> or whether the plugin can do this autmatically.
> 
> Are there any full sized "hello world" style poms that illustrate how to put
> dependency jars inside of an application jar?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to