You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dgabriel <da...@citi.com> on 2013/02/14 11:49:19 UTC

Maven- Create a JAR containing unexploded JARs

Hi, I'm trying to create a JAR containing other .jar files using Maven. Also,
I'd like them to be in a specific directory. So for example, I want the main
JAR to contain a directory, say /MyJars/... , and then that directory to
contain all of my dependencies in .jar format. I've been using the Assembly
plugin but can only seen to get it to create the depency paths rather that
actual JARs. I've also tried Shade & one-jar but had no luck. 

My pom code is:

<plugins>
  		<plugin>
  			<groupId>org.apache.maven.plugins</groupId>
  			<artifactId>maven-assembly-plugin</artifactId>
  			<executions>
  				<execution>
  				<id>create-my-bundle</id>
  					<phase>package</phase>
  					<goals>
  						<goal>single</goal>
  					</goals>
  				</execution>
  			</executions>
  			<configuration>
  				<descriptorRefs>
  					<descriptorRef>jar-with-dependencies</descriptorRef>
  				</descriptorRefs>
  			</configuration>
  		</plugin>
  	</plugins>

although I have been trying a lot of variations as well. Any help would be
appreciated



--
View this message in context: http://maven.40175.n5.nabble.com/Maven-Create-a-JAR-containing-unexploded-JARs-tp5746934.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven- Create a JAR containing unexploded JARs

Posted by Baptiste MATHUS <ml...@batmat.net>.
Hi,
It would help if you tell us where you got so far. Is this generating
something close to what you need, if yes, what's missing, etc.

Cheers
Le 14 févr. 2013 13:03, "dgabriel" <da...@citi.com> a écrit :

> Hi, I'm trying to create a JAR containing other .jar files using Maven.
> Also,
> I'd like them to be in a specific directory. So for example, I want the
> main
> JAR to contain a directory, say /MyJars/... , and then that directory to
> contain all of my dependencies in .jar format. I've been using the Assembly
> plugin but can only seen to get it to create the depency paths rather that
> actual JARs. I've also tried Shade & one-jar but had no luck.
>
> My pom code is:
>
> <plugins>
>                 <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-assembly-plugin</artifactId>
>                         <executions>
>                                 <execution>
>                                 <id>create-my-bundle</id>
>                                         <phase>package</phase>
>                                         <goals>
>                                                 <goal>single</goal>
>                                         </goals>
>                                 </execution>
>                         </executions>
>                         <configuration>
>                                 <descriptorRefs>
>
> <descriptorRef>jar-with-dependencies</descriptorRef>
>                                 </descriptorRefs>
>                         </configuration>
>                 </plugin>
>         </plugins>
>
> although I have been trying a lot of variations as well. Any help would be
> appreciated
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Maven-Create-a-JAR-containing-unexploded-JARs-tp5746934.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>