You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jpyork <jo...@dhltd.com> on 2012/08/24 22:14:14 UTC
Creating one big jar in Maven?
Hello I am a bit new to Maven and have taken over a build from a departed
employee that uses Maven. The issue is that he over complicated it with vb
scripts and other items, but I have finally got the project to build with
just executing a parent POM file. The issue I have now is that I have 6
internal modules that we build and they all produce jars in different
locations, but I want to be able to bring them all together in one location
and then package them all together for one big jar file. I have been adding
things to the chile POM's without success.
Anyone got a way to do this?
--
View this message in context: http://maven.40175.n5.nabble.com/Creating-one-big-jar-in-Maven-tp5718117.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: Creating one big jar in Maven?
Posted by Mark Struberg <st...@yahoo.de>.
If your goal is to have only one fat jar which contains all stuff and is executable then you can also try the onejar-maven-plugin
http://code.google.com/p/onejar-maven-plugin/
LieGrue,
strub
----- Original Message -----
> From: Nikolay Rychkov <ni...@gmail.com>
> To: Maven Users List <us...@maven.apache.org>
> Cc:
> Sent: Sunday, August 26, 2012 2:40 AM
> Subject: Re: Creating one big jar in Maven?
>
> I use configs
> <!--<plugin>-->
>
> <!--<artifactId>maven-assembly-plugin</artifactId>-->
> <!--<configuration>-->
> <!--<descriptorRefs>-->
>
> <!--<descriptorRef>jar-with-dependencies</descriptorRef>-->
> <!--</descriptorRefs>-->
> <!--<archive>-->
> <!--<manifest>-->
>
> <!--<mainClass>agost.jetty.Launcher</mainClass>-->
> <!--</manifest>-->
> <!--</archive>-->
> <!--</configuration>-->
> <!--<executions>-->
> <!--<execution>-->
> <!--<phase>package</phase>-->
> <!--<goals>-->
> <!--<goal>single</goal>-->
> <!--</goals>-->
> <!--</execution>-->
> <!--</executions>-->
> <!--</plugin>-->
>
> <!--<plugin>-->
> <!--<groupId>org.apache.maven.plugins</groupId>-->
> <!--<artifactId>maven-shade-plugin</artifactId>-->
> <!--<version>1.6</version>-->
> <!--<executions>-->
> <!--<execution>-->
> <!--<phase>package</phase>-->
> <!--<goals>-->
> <!--<goal>shade</goal>-->
> <!--</goals>-->
> <!--<configuration>-->
> <!--<transformers>-->
> <!--<transformer-->
>
> <!--implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">-->
>
> <!--<mainClass>agost.jetty.Launchercher</mainClass>-->
> <!--</transformer>-->
> <!--</transformers>-->
> <!--</configuration>-->
> <!--</execution>-->
> <!--</executions>-->
> <!--</plugin>-->
>
> 2012/8/25 Aliaksei Lahachou <al...@gmail.com>
>
>> Hi,
>>
>> take a look on maven-shade-plugin. I believe it's simpler if you only
> need
>> to build an uber-jar.
>>
>>
>> Regards,
>> htfv (Aliaksei Lahachou)
>>
>>
>> On Sat, Aug 25, 2012 at 7:19 AM, Barrie Treloar <ba...@gmail.com>
>> wrote:
>>
>> > On Sat, Aug 25, 2012 at 5:44 AM, jpyork
> <jo...@dhltd.com>
>> wrote:
>> > > Hello I am a bit new to Maven and have taken over a build from a
>> departed
>> > > employee that uses Maven. The issue is that he over complicated
> it
>> with
>> > vb
>> > > scripts and other items, but I have finally got the project to
> build
>> with
>> > > just executing a parent POM file. The issue I have now is that I
> have
>> 6
>> > > internal modules that we build and they all produce jars in
> different
>> > > locations, but I want to be able to bring them all together in
> one
>> > location
>> > > and then package them all together for one big jar file. I have
> been
>> > adding
>> > > things to the chile POM's without success.
>> > >
>> > > Anyone got a way to do this?
>> >
>> > http://lmgtfy.com/?q=one+big+jar+maven
>> >
>> > Look at the assembly plugin.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Creating one big jar in Maven?
Posted by Nikolay Rychkov <ni...@gmail.com>.
I use configs
<!--<plugin>-->
<!--<artifactId>maven-assembly-plugin</artifactId>-->
<!--<configuration>-->
<!--<descriptorRefs>-->
<!--<descriptorRef>jar-with-dependencies</descriptorRef>-->
<!--</descriptorRefs>-->
<!--<archive>-->
<!--<manifest>-->
<!--<mainClass>agost.jetty.Launcher</mainClass>-->
<!--</manifest>-->
<!--</archive>-->
<!--</configuration>-->
<!--<executions>-->
<!--<execution>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>single</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
<!--<plugin>-->
<!--<groupId>org.apache.maven.plugins</groupId>-->
<!--<artifactId>maven-shade-plugin</artifactId>-->
<!--<version>1.6</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>shade</goal>-->
<!--</goals>-->
<!--<configuration>-->
<!--<transformers>-->
<!--<transformer-->
<!--implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">-->
<!--<mainClass>agost.jetty.Launchercher</mainClass>-->
<!--</transformer>-->
<!--</transformers>-->
<!--</configuration>-->
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
2012/8/25 Aliaksei Lahachou <al...@gmail.com>
> Hi,
>
> take a look on maven-shade-plugin. I believe it's simpler if you only need
> to build an uber-jar.
>
>
> Regards,
> htfv (Aliaksei Lahachou)
>
>
> On Sat, Aug 25, 2012 at 7:19 AM, Barrie Treloar <ba...@gmail.com>
> wrote:
>
> > On Sat, Aug 25, 2012 at 5:44 AM, jpyork <jo...@dhltd.com>
> wrote:
> > > Hello I am a bit new to Maven and have taken over a build from a
> departed
> > > employee that uses Maven. The issue is that he over complicated it
> with
> > vb
> > > scripts and other items, but I have finally got the project to build
> with
> > > just executing a parent POM file. The issue I have now is that I have
> 6
> > > internal modules that we build and they all produce jars in different
> > > locations, but I want to be able to bring them all together in one
> > location
> > > and then package them all together for one big jar file. I have been
> > adding
> > > things to the chile POM's without success.
> > >
> > > Anyone got a way to do this?
> >
> > http://lmgtfy.com/?q=one+big+jar+maven
> >
> > Look at the assembly plugin.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
Re: Creating one big jar in Maven?
Posted by Aliaksei Lahachou <al...@gmail.com>.
Hi,
take a look on maven-shade-plugin. I believe it's simpler if you only need
to build an uber-jar.
Regards,
htfv (Aliaksei Lahachou)
On Sat, Aug 25, 2012 at 7:19 AM, Barrie Treloar <ba...@gmail.com> wrote:
> On Sat, Aug 25, 2012 at 5:44 AM, jpyork <jo...@dhltd.com> wrote:
> > Hello I am a bit new to Maven and have taken over a build from a departed
> > employee that uses Maven. The issue is that he over complicated it with
> vb
> > scripts and other items, but I have finally got the project to build with
> > just executing a parent POM file. The issue I have now is that I have 6
> > internal modules that we build and they all produce jars in different
> > locations, but I want to be able to bring them all together in one
> location
> > and then package them all together for one big jar file. I have been
> adding
> > things to the chile POM's without success.
> >
> > Anyone got a way to do this?
>
> http://lmgtfy.com/?q=one+big+jar+maven
>
> Look at the assembly plugin.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Creating one big jar in Maven?
Posted by Barrie Treloar <ba...@gmail.com>.
On Sat, Aug 25, 2012 at 2:49 PM, Barrie Treloar <ba...@gmail.com> wrote:
> On Sat, Aug 25, 2012 at 5:44 AM, jpyork <jo...@dhltd.com> wrote:
>> Hello I am a bit new to Maven and have taken over a build from a departed
>> employee that uses Maven. The issue is that he over complicated it with vb
>> scripts and other items, but I have finally got the project to build with
>> just executing a parent POM file. The issue I have now is that I have 6
>> internal modules that we build and they all produce jars in different
>> locations, but I want to be able to bring them all together in one location
>> and then package them all together for one big jar file. I have been adding
>> things to the chile POM's without success.
So, how did you go?
There were a few suggestions here but nothing further from you.
It is always good for the archives if you could describe what you
decided to do, so other people can find your answers too.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Creating one big jar in Maven?
Posted by Barrie Treloar <ba...@gmail.com>.
On Sat, Aug 25, 2012 at 5:44 AM, jpyork <jo...@dhltd.com> wrote:
> Hello I am a bit new to Maven and have taken over a build from a departed
> employee that uses Maven. The issue is that he over complicated it with vb
> scripts and other items, but I have finally got the project to build with
> just executing a parent POM file. The issue I have now is that I have 6
> internal modules that we build and they all produce jars in different
> locations, but I want to be able to bring them all together in one location
> and then package them all together for one big jar file. I have been adding
> things to the chile POM's without success.
>
> Anyone got a way to do this?
http://lmgtfy.com/?q=one+big+jar+maven
Look at the assembly plugin.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org