Hi Nick Thanks for the input.
I've tried the "Maven Assembly Plugin" and some else has suggested the "maven-shade-plugin". Both, pretty much, do the job...But, the "maven-shade-plugin" names the artifact the way I want. I will post the entire pom, below, so that new comers to Maven2 -- like myself -- can get a better context of how these plugins fit into my pom: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>test.web.service</groupId> <artifactId>testwsClient</artifactId> <packaging>jar</packaging> <version>0.0.1-SNAPSHOT</version> <name>testwsClient</name> <url>http://maven.apache.org</url> <repositories> <repository> <id>maven-repository.dev.java.net</id> <name>Java.net Repository for Maven 1</name> <url>http://download.java.net/maven/1/</url> <layout>legacy</layout> </repository> <repository> <id>maven2-repository.dev.java.net</id> <name>Java.net Repository for Maven 2</name> <url>http://download.java.net/maven/2/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>maven2-repository.dev.java.net</id> <name>Java.net Repository for Maven</name> <url>http://download.java.net/maven/2/</url> <layout>default</layout> </pluginRepository> </pluginRepositories> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>jaxws-rt</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>resolver</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>was61</groupId> <artifactId>ws_runtime</artifactId> <version>6.1.0</version> <scope>system</scope> <systemPath>C:/opt/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.websphere.v61_6.1.200/ws_runtime.jar</systemPath> </dependency> <dependency> <groupId>was61</groupId> <artifactId>ws_runtime</artifactId> <version>6.1.0</version> <scope>system</scope> <systemPath> C:/opt/IBM/WebSphere/AppServer/lib/j2ee.jar</systemPath> </dependency> <dependency> <groupId>was61</groupId> <artifactId>com.ibm.jaxws.thinclient </artifactId> <version>6.1.0</version> <scope>system</scope> <systemPath>C:/opt/IBM/WebSphere/AppServer/runtimes/com.ibm.jaxws.thinclient_6.1.0.jar</systemPath> </dependency> </dependencies> <build> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>wsimport</goal> </goals> </execution> </executions> <configuration> <packageName>test.web.service.testws </packageName> <wsdlDirectory> C:/EGworkspace3/testws/testws-war/src/main/resources </wsdlDirectory> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <!-- this produces: "testwsClient-0.0.1-SNAPSHOT.jar", you can run from the windows command line like: cd c:/EGworkspace4/testwsClient/target java -classpath ".;testwsClient-0.0.1-SNAPSHOT.jar" test.web.service.client.TestwsClient --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" /> </transformers> </configuration> </execution> </executions> </plugin> <!-- this produces: "testwsClient-jar-with-dependencies.jar", you can run from the command line like: cd c:/EGworkspace4/testwsClient/target java -classpath ".;testwsClient-jar-with-dependencies.jar" test.web.service.client.TestwsClient <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>attached</goal> </goals> </execution> </executions> </plugin> --> </plugins> </build> </project> Nick Stolwijk-4 wrote: > > Hi, > > Take a look at the Maven Assembly Plugin [1], especially its unpack goal > [2] > in combination with the predefined descriptor "jar-with-dependencies" [3]. > I > think this does exactly what you want. > > Hth, > > [1] http://maven.apache.org/plugins/maven-assembly-plugin/ > [2] http://maven.apache.org/plugins/maven-assembly-plugin/unpack-mojo.html > [3] > http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies > > Nick Stolwijk > ~Java Developer~ > > Iprofs BV. > Claus Sluterweg 125 > 2012 WS Haarlem > www.iprofs.nl > > > On Tue, Aug 19, 2008 at 5:57 AM, Wayne Fay <[EMAIL PROTECTED]> wrote: > >> On 8/18/08, sairndain <[EMAIL PROTECTED]> wrote: >> > >> > 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.... >> >> You realize that "jars inside a jar" is not supported by the default >> Sun JVM classloader, right? >> >> This is a packaging approach supported by EARs and WARs, but not JARs >> unless you are running a specialized classloader. >> >> You can also unzip the various dependency jars (into /target) and >> include them in your jar, which would give you a single (large) jar >> file that can execute your app. The dependency plugin can help with >> this and/or assembly plugin. >> >> Wayne >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/including-jars-in-a-jar-tp19043412p19049257.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
