You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Yaakov Chaikin <ya...@gmail.com> on 2010/02/19 14:57:20 UTC
Assemble a jar with dependent jars next to it
Hi all,
Tried Googling, but nothing that useful came up... I am pretty sure
it's possible to do this though...
I have a multi-module project and one of the modules is a standalone
executable with dependencies on other modules as well as other 3rd
party libraries.
I need to run an assembly such that the executable module ends up as a
JAR with Class-Path in its manifest pointing to all of its JAR
dependencies and place all the other dependencies (whatever they are -
I don't want to have to specify them all by hand in assembly.xml)
should be brought into the same directory and the Class-Path should
have relative path pointing to them.
Does anyone have some snippets they can share to accomplish this? The
assembly documentation is pretty thin so I would so much love to avoid
trial-and-error pattern.
Any help would be greatly appreciated.
Thanks,
Yaakov.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Assemble a jar with dependent jars next to it
Posted by Aleksey Didik <di...@magenta-technology.ru>.
We use
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${main.class}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
with own assembly descriptor with
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
Assembly put jar + dependency jars into one folder and main jar manifest
contains class-path with all dependencies.
THT,
Aleksey.
19.02.2010 18:07, Yaakov Chaikin пишет:
> Thanks, but what I am really looking for is jar + dependencies in lib
> folder type of outcome. Is there a way to tweak what is on that page
> to get assembly to produce that?
>
> Thanks,
> Yaakov.
>
> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar<an...@hammar.net> wrote:
>
>> I think this is what you're looking for:
>> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
>>
>> /Anders
>>
>> On Fri, Feb 19, 2010 at 14:57, Yaakov Chaikin<ya...@gmail.com>wrote:
>>
>>
>>> Hi all,
>>>
>>> Tried Googling, but nothing that useful came up... I am pretty sure
>>> it's possible to do this though...
>>>
>>> I have a multi-module project and one of the modules is a standalone
>>> executable with dependencies on other modules as well as other 3rd
>>> party libraries.
>>>
>>> I need to run an assembly such that the executable module ends up as a
>>> JAR with Class-Path in its manifest pointing to all of its JAR
>>> dependencies and place all the other dependencies (whatever they are -
>>> I don't want to have to specify them all by hand in assembly.xml)
>>> should be brought into the same directory and the Class-Path should
>>> have relative path pointing to them.
>>>
>>> Does anyone have some snippets they can share to accomplish this? The
>>> assembly documentation is pretty thin so I would so much love to avoid
>>> trial-and-error pattern.
>>>
>>> Any help would be greatly appreciated.
>>>
>>> Thanks,
>>> Yaakov.
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Assemble a jar with dependent jars next to it
Posted by Yaakov Chaikin <ya...@gmail.com>.
Thank you all for the suggestions. Much appreciated! We finally got it
to work the way we wanted using the first couple of suggestions that
came in.
Regards,
Yaakov.
On Fri, Feb 19, 2010 at 11:52 AM, Simone Tripodi
<si...@gmail.com> wrote:
> Hi all,
> even if the assembly in the jar-with-dependencies works fine, I'd
> suggest also the maven-shade-plugin[1], easy to configure and fast.
> All the best,
> Simo
>
> [1] http://maven.apache.org/plugins/maven-shade-plugin/
>
> http://people.apache.org/~simonetripodi/
>
>
>
> On Fri, Feb 19, 2010 at 5:28 PM, Stephen Connolly
> <st...@gmail.com> wrote:
>> or perhaps you are after appassember-maven-plugin at mojo.codehaus.org
>>
>> On 19 February 2010 15:50, eyal edri <ey...@gmail.com> wrote:
>>
>>> you can also try the dependency:copy-dependencies plugin.
>>>
>>> it will copy all your dependencies jar to the folder you want (classpath).
>>>
>>>
>>> On Fri, Feb 19, 2010 at 4:20 PM, Yaakov Chaikin <yaakov.chaikin@gmail.com
>>> >wrote:
>>>
>>> > Thanks! I'll try that out.
>>> >
>>> > Yaakov.
>>> >
>>> > On Fri, Feb 19, 2010 at 9:18 AM, Aleksey Didik
>>> > <di...@magenta-technology.ru> wrote:
>>> > > The way to put jar + dependencies jars in one folder is:
>>> > >
>>> > > <assembly>
>>> > > <id>bundle</id>
>>> > > <formats>
>>> > > <format>zip</format>
>>> > > <format>tar.gz</format>
>>> > > </formats>
>>> > >
>>> > > <includeBaseDirectory>false</includeBaseDirectory>
>>> > >
>>> > > <dependencySets>
>>> > > <dependencySet>
>>> > > <outputDirectory>/</outputDirectory>
>>> > > </dependencySet>
>>> > > </dependencySets>
>>> > > </assembly>
>>> > >
>>> > > Aleksey.
>>> > >
>>> > >
>>> > > 19.02.2010 18:07, Yaakov Chaikin пишет:
>>> > >>
>>> > >> Thanks, but what I am really looking for is jar + dependencies in lib
>>> > >> folder type of outcome. Is there a way to tweak what is on that page
>>> > >> to get assembly to produce that?
>>> > >>
>>> > >> Thanks,
>>> > >> Yaakov.
>>> > >>
>>> > >> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar<an...@hammar.net>
>>> > wrote:
>>> > >>
>>> > >>>
>>> > >>> I think this is what you're looking for:
>>> > >>>
>>> > >>>
>>> >
>>> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
>>> > >>>
>>> > >>> /Anders
>>> > >>>
>>> > >>> On Fri, Feb 19, 2010 at 14:57, Yaakov
>>> > >>> Chaikin<ya...@gmail.com>wrote:
>>> > >>>
>>> > >>>
>>> > >>>>
>>> > >>>> Hi all,
>>> > >>>>
>>> > >>>> Tried Googling, but nothing that useful came up... I am pretty sure
>>> > >>>> it's possible to do this though...
>>> > >>>>
>>> > >>>> I have a multi-module project and one of the modules is a standalone
>>> > >>>> executable with dependencies on other modules as well as other 3rd
>>> > >>>> party libraries.
>>> > >>>>
>>> > >>>> I need to run an assembly such that the executable module ends up as
>>> a
>>> > >>>> JAR with Class-Path in its manifest pointing to all of its JAR
>>> > >>>> dependencies and place all the other dependencies (whatever they are
>>> -
>>> > >>>> I don't want to have to specify them all by hand in assembly.xml)
>>> > >>>> should be brought into the same directory and the Class-Path should
>>> > >>>> have relative path pointing to them.
>>> > >>>>
>>> > >>>> Does anyone have some snippets they can share to accomplish this?
>>> The
>>> > >>>> assembly documentation is pretty thin so I would so much love to
>>> avoid
>>> > >>>> trial-and-error pattern.
>>> > >>>>
>>> > >>>> Any help would be greatly appreciated.
>>> > >>>>
>>> > >>>> Thanks,
>>> > >>>> Yaakov.
>>> > >>>>
>>> > >>>>
>>> ---------------------------------------------------------------------
>>> > >>>> 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
>>> > >>
>>> > >>
>>> > >
>>> > >
>>> > > ---------------------------------------------------------------------
>>> > > 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
>>> >
>>> >
>>>
>>>
>>> --
>>> Eyal Edri
>>>
>>
>
> ---------------------------------------------------------------------
> 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: Assemble a jar with dependent jars next to it
Posted by Simone Tripodi <si...@gmail.com>.
Hi all,
even if the assembly in the jar-with-dependencies works fine, I'd
suggest also the maven-shade-plugin[1], easy to configure and fast.
All the best,
Simo
[1] http://maven.apache.org/plugins/maven-shade-plugin/
http://people.apache.org/~simonetripodi/
On Fri, Feb 19, 2010 at 5:28 PM, Stephen Connolly
<st...@gmail.com> wrote:
> or perhaps you are after appassember-maven-plugin at mojo.codehaus.org
>
> On 19 February 2010 15:50, eyal edri <ey...@gmail.com> wrote:
>
>> you can also try the dependency:copy-dependencies plugin.
>>
>> it will copy all your dependencies jar to the folder you want (classpath).
>>
>>
>> On Fri, Feb 19, 2010 at 4:20 PM, Yaakov Chaikin <yaakov.chaikin@gmail.com
>> >wrote:
>>
>> > Thanks! I'll try that out.
>> >
>> > Yaakov.
>> >
>> > On Fri, Feb 19, 2010 at 9:18 AM, Aleksey Didik
>> > <di...@magenta-technology.ru> wrote:
>> > > The way to put jar + dependencies jars in one folder is:
>> > >
>> > > <assembly>
>> > > <id>bundle</id>
>> > > <formats>
>> > > <format>zip</format>
>> > > <format>tar.gz</format>
>> > > </formats>
>> > >
>> > > <includeBaseDirectory>false</includeBaseDirectory>
>> > >
>> > > <dependencySets>
>> > > <dependencySet>
>> > > <outputDirectory>/</outputDirectory>
>> > > </dependencySet>
>> > > </dependencySets>
>> > > </assembly>
>> > >
>> > > Aleksey.
>> > >
>> > >
>> > > 19.02.2010 18:07, Yaakov Chaikin пишет:
>> > >>
>> > >> Thanks, but what I am really looking for is jar + dependencies in lib
>> > >> folder type of outcome. Is there a way to tweak what is on that page
>> > >> to get assembly to produce that?
>> > >>
>> > >> Thanks,
>> > >> Yaakov.
>> > >>
>> > >> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar<an...@hammar.net>
>> > wrote:
>> > >>
>> > >>>
>> > >>> I think this is what you're looking for:
>> > >>>
>> > >>>
>> >
>> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
>> > >>>
>> > >>> /Anders
>> > >>>
>> > >>> On Fri, Feb 19, 2010 at 14:57, Yaakov
>> > >>> Chaikin<ya...@gmail.com>wrote:
>> > >>>
>> > >>>
>> > >>>>
>> > >>>> Hi all,
>> > >>>>
>> > >>>> Tried Googling, but nothing that useful came up... I am pretty sure
>> > >>>> it's possible to do this though...
>> > >>>>
>> > >>>> I have a multi-module project and one of the modules is a standalone
>> > >>>> executable with dependencies on other modules as well as other 3rd
>> > >>>> party libraries.
>> > >>>>
>> > >>>> I need to run an assembly such that the executable module ends up as
>> a
>> > >>>> JAR with Class-Path in its manifest pointing to all of its JAR
>> > >>>> dependencies and place all the other dependencies (whatever they are
>> -
>> > >>>> I don't want to have to specify them all by hand in assembly.xml)
>> > >>>> should be brought into the same directory and the Class-Path should
>> > >>>> have relative path pointing to them.
>> > >>>>
>> > >>>> Does anyone have some snippets they can share to accomplish this?
>> The
>> > >>>> assembly documentation is pretty thin so I would so much love to
>> avoid
>> > >>>> trial-and-error pattern.
>> > >>>>
>> > >>>> Any help would be greatly appreciated.
>> > >>>>
>> > >>>> Thanks,
>> > >>>> Yaakov.
>> > >>>>
>> > >>>>
>> ---------------------------------------------------------------------
>> > >>>> 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
>> > >>
>> > >>
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > 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
>> >
>> >
>>
>>
>> --
>> Eyal Edri
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Assemble a jar with dependent jars next to it
Posted by Stephen Connolly <st...@gmail.com>.
or perhaps you are after appassember-maven-plugin at mojo.codehaus.org
On 19 February 2010 15:50, eyal edri <ey...@gmail.com> wrote:
> you can also try the dependency:copy-dependencies plugin.
>
> it will copy all your dependencies jar to the folder you want (classpath).
>
>
> On Fri, Feb 19, 2010 at 4:20 PM, Yaakov Chaikin <yaakov.chaikin@gmail.com
> >wrote:
>
> > Thanks! I'll try that out.
> >
> > Yaakov.
> >
> > On Fri, Feb 19, 2010 at 9:18 AM, Aleksey Didik
> > <di...@magenta-technology.ru> wrote:
> > > The way to put jar + dependencies jars in one folder is:
> > >
> > > <assembly>
> > > <id>bundle</id>
> > > <formats>
> > > <format>zip</format>
> > > <format>tar.gz</format>
> > > </formats>
> > >
> > > <includeBaseDirectory>false</includeBaseDirectory>
> > >
> > > <dependencySets>
> > > <dependencySet>
> > > <outputDirectory>/</outputDirectory>
> > > </dependencySet>
> > > </dependencySets>
> > > </assembly>
> > >
> > > Aleksey.
> > >
> > >
> > > 19.02.2010 18:07, Yaakov Chaikin пишет:
> > >>
> > >> Thanks, but what I am really looking for is jar + dependencies in lib
> > >> folder type of outcome. Is there a way to tweak what is on that page
> > >> to get assembly to produce that?
> > >>
> > >> Thanks,
> > >> Yaakov.
> > >>
> > >> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar<an...@hammar.net>
> > wrote:
> > >>
> > >>>
> > >>> I think this is what you're looking for:
> > >>>
> > >>>
> >
> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
> > >>>
> > >>> /Anders
> > >>>
> > >>> On Fri, Feb 19, 2010 at 14:57, Yaakov
> > >>> Chaikin<ya...@gmail.com>wrote:
> > >>>
> > >>>
> > >>>>
> > >>>> Hi all,
> > >>>>
> > >>>> Tried Googling, but nothing that useful came up... I am pretty sure
> > >>>> it's possible to do this though...
> > >>>>
> > >>>> I have a multi-module project and one of the modules is a standalone
> > >>>> executable with dependencies on other modules as well as other 3rd
> > >>>> party libraries.
> > >>>>
> > >>>> I need to run an assembly such that the executable module ends up as
> a
> > >>>> JAR with Class-Path in its manifest pointing to all of its JAR
> > >>>> dependencies and place all the other dependencies (whatever they are
> -
> > >>>> I don't want to have to specify them all by hand in assembly.xml)
> > >>>> should be brought into the same directory and the Class-Path should
> > >>>> have relative path pointing to them.
> > >>>>
> > >>>> Does anyone have some snippets they can share to accomplish this?
> The
> > >>>> assembly documentation is pretty thin so I would so much love to
> avoid
> > >>>> trial-and-error pattern.
> > >>>>
> > >>>> Any help would be greatly appreciated.
> > >>>>
> > >>>> Thanks,
> > >>>> Yaakov.
> > >>>>
> > >>>>
> ---------------------------------------------------------------------
> > >>>> 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
> > >>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
> --
> Eyal Edri
>
Re: Assemble a jar with dependent jars next to it
Posted by eyal edri <ey...@gmail.com>.
you can also try the dependency:copy-dependencies plugin.
it will copy all your dependencies jar to the folder you want (classpath).
On Fri, Feb 19, 2010 at 4:20 PM, Yaakov Chaikin <ya...@gmail.com>wrote:
> Thanks! I'll try that out.
>
> Yaakov.
>
> On Fri, Feb 19, 2010 at 9:18 AM, Aleksey Didik
> <di...@magenta-technology.ru> wrote:
> > The way to put jar + dependencies jars in one folder is:
> >
> > <assembly>
> > <id>bundle</id>
> > <formats>
> > <format>zip</format>
> > <format>tar.gz</format>
> > </formats>
> >
> > <includeBaseDirectory>false</includeBaseDirectory>
> >
> > <dependencySets>
> > <dependencySet>
> > <outputDirectory>/</outputDirectory>
> > </dependencySet>
> > </dependencySets>
> > </assembly>
> >
> > Aleksey.
> >
> >
> > 19.02.2010 18:07, Yaakov Chaikin пишет:
> >>
> >> Thanks, but what I am really looking for is jar + dependencies in lib
> >> folder type of outcome. Is there a way to tweak what is on that page
> >> to get assembly to produce that?
> >>
> >> Thanks,
> >> Yaakov.
> >>
> >> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar<an...@hammar.net>
> wrote:
> >>
> >>>
> >>> I think this is what you're looking for:
> >>>
> >>>
> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
> >>>
> >>> /Anders
> >>>
> >>> On Fri, Feb 19, 2010 at 14:57, Yaakov
> >>> Chaikin<ya...@gmail.com>wrote:
> >>>
> >>>
> >>>>
> >>>> Hi all,
> >>>>
> >>>> Tried Googling, but nothing that useful came up... I am pretty sure
> >>>> it's possible to do this though...
> >>>>
> >>>> I have a multi-module project and one of the modules is a standalone
> >>>> executable with dependencies on other modules as well as other 3rd
> >>>> party libraries.
> >>>>
> >>>> I need to run an assembly such that the executable module ends up as a
> >>>> JAR with Class-Path in its manifest pointing to all of its JAR
> >>>> dependencies and place all the other dependencies (whatever they are -
> >>>> I don't want to have to specify them all by hand in assembly.xml)
> >>>> should be brought into the same directory and the Class-Path should
> >>>> have relative path pointing to them.
> >>>>
> >>>> Does anyone have some snippets they can share to accomplish this? The
> >>>> assembly documentation is pretty thin so I would so much love to avoid
> >>>> trial-and-error pattern.
> >>>>
> >>>> Any help would be greatly appreciated.
> >>>>
> >>>> Thanks,
> >>>> Yaakov.
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> 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
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
--
Eyal Edri
Re: Assemble a jar with dependent jars next to it
Posted by Yaakov Chaikin <ya...@gmail.com>.
Thanks! I'll try that out.
Yaakov.
On Fri, Feb 19, 2010 at 9:18 AM, Aleksey Didik
<di...@magenta-technology.ru> wrote:
> The way to put jar + dependencies jars in one folder is:
>
> <assembly>
> <id>bundle</id>
> <formats>
> <format>zip</format>
> <format>tar.gz</format>
> </formats>
>
> <includeBaseDirectory>false</includeBaseDirectory>
>
> <dependencySets>
> <dependencySet>
> <outputDirectory>/</outputDirectory>
> </dependencySet>
> </dependencySets>
> </assembly>
>
> Aleksey.
>
>
> 19.02.2010 18:07, Yaakov Chaikin пишет:
>>
>> Thanks, but what I am really looking for is jar + dependencies in lib
>> folder type of outcome. Is there a way to tweak what is on that page
>> to get assembly to produce that?
>>
>> Thanks,
>> Yaakov.
>>
>> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar<an...@hammar.net> wrote:
>>
>>>
>>> I think this is what you're looking for:
>>>
>>> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
>>>
>>> /Anders
>>>
>>> On Fri, Feb 19, 2010 at 14:57, Yaakov
>>> Chaikin<ya...@gmail.com>wrote:
>>>
>>>
>>>>
>>>> Hi all,
>>>>
>>>> Tried Googling, but nothing that useful came up... I am pretty sure
>>>> it's possible to do this though...
>>>>
>>>> I have a multi-module project and one of the modules is a standalone
>>>> executable with dependencies on other modules as well as other 3rd
>>>> party libraries.
>>>>
>>>> I need to run an assembly such that the executable module ends up as a
>>>> JAR with Class-Path in its manifest pointing to all of its JAR
>>>> dependencies and place all the other dependencies (whatever they are -
>>>> I don't want to have to specify them all by hand in assembly.xml)
>>>> should be brought into the same directory and the Class-Path should
>>>> have relative path pointing to them.
>>>>
>>>> Does anyone have some snippets they can share to accomplish this? The
>>>> assembly documentation is pretty thin so I would so much love to avoid
>>>> trial-and-error pattern.
>>>>
>>>> Any help would be greatly appreciated.
>>>>
>>>> Thanks,
>>>> Yaakov.
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: Assemble a jar with dependent jars next to it
Posted by Aleksey Didik <di...@magenta-technology.ru>.
The way to put jar + dependencies jars in one folder is:
<assembly>
<id>bundle</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>
Aleksey.
19.02.2010 18:07, Yaakov Chaikin пишет:
> Thanks, but what I am really looking for is jar + dependencies in lib
> folder type of outcome. Is there a way to tweak what is on that page
> to get assembly to produce that?
>
> Thanks,
> Yaakov.
>
> On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar<an...@hammar.net> wrote:
>
>> I think this is what you're looking for:
>> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
>>
>> /Anders
>>
>> On Fri, Feb 19, 2010 at 14:57, Yaakov Chaikin<ya...@gmail.com>wrote:
>>
>>
>>> Hi all,
>>>
>>> Tried Googling, but nothing that useful came up... I am pretty sure
>>> it's possible to do this though...
>>>
>>> I have a multi-module project and one of the modules is a standalone
>>> executable with dependencies on other modules as well as other 3rd
>>> party libraries.
>>>
>>> I need to run an assembly such that the executable module ends up as a
>>> JAR with Class-Path in its manifest pointing to all of its JAR
>>> dependencies and place all the other dependencies (whatever they are -
>>> I don't want to have to specify them all by hand in assembly.xml)
>>> should be brought into the same directory and the Class-Path should
>>> have relative path pointing to them.
>>>
>>> Does anyone have some snippets they can share to accomplish this? The
>>> assembly documentation is pretty thin so I would so much love to avoid
>>> trial-and-error pattern.
>>>
>>> Any help would be greatly appreciated.
>>>
>>> Thanks,
>>> Yaakov.
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Assemble a jar with dependent jars next to it
Posted by Yaakov Chaikin <ya...@gmail.com>.
Thanks, but what I am really looking for is jar + dependencies in lib
folder type of outcome. Is there a way to tweak what is on that page
to get assembly to produce that?
Thanks,
Yaakov.
On Fri, Feb 19, 2010 at 9:02 AM, Anders Hammar <an...@hammar.net> wrote:
> I think this is what you're looking for:
> http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
>
> /Anders
>
> On Fri, Feb 19, 2010 at 14:57, Yaakov Chaikin <ya...@gmail.com>wrote:
>
>> Hi all,
>>
>> Tried Googling, but nothing that useful came up... I am pretty sure
>> it's possible to do this though...
>>
>> I have a multi-module project and one of the modules is a standalone
>> executable with dependencies on other modules as well as other 3rd
>> party libraries.
>>
>> I need to run an assembly such that the executable module ends up as a
>> JAR with Class-Path in its manifest pointing to all of its JAR
>> dependencies and place all the other dependencies (whatever they are -
>> I don't want to have to specify them all by hand in assembly.xml)
>> should be brought into the same directory and the Class-Path should
>> have relative path pointing to them.
>>
>> Does anyone have some snippets they can share to accomplish this? The
>> assembly documentation is pretty thin so I would so much love to avoid
>> trial-and-error pattern.
>>
>> Any help would be greatly appreciated.
>>
>> Thanks,
>> Yaakov.
>>
>> ---------------------------------------------------------------------
>> 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: Assemble a jar with dependent jars next to it
Posted by Anders Hammar <an...@hammar.net>.
I think this is what you're looking for:
http://www.sonatype.com/people/2009/08/how-to-make-an-executable-jar-in-maven/
/Anders
On Fri, Feb 19, 2010 at 14:57, Yaakov Chaikin <ya...@gmail.com>wrote:
> Hi all,
>
> Tried Googling, but nothing that useful came up... I am pretty sure
> it's possible to do this though...
>
> I have a multi-module project and one of the modules is a standalone
> executable with dependencies on other modules as well as other 3rd
> party libraries.
>
> I need to run an assembly such that the executable module ends up as a
> JAR with Class-Path in its manifest pointing to all of its JAR
> dependencies and place all the other dependencies (whatever they are -
> I don't want to have to specify them all by hand in assembly.xml)
> should be brought into the same directory and the Class-Path should
> have relative path pointing to them.
>
> Does anyone have some snippets they can share to accomplish this? The
> assembly documentation is pretty thin so I would so much love to avoid
> trial-and-error pattern.
>
> Any help would be greatly appreciated.
>
> Thanks,
> Yaakov.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>