You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ali Sakebi <al...@gmail.com> on 2007/05/30 12:49:57 UTC
How can I include pom.xml dependencies in output jar???
Hi
Can some one plz guide me how can I make maven to include dependencies
defined in pom.xml in output jar file???
Regards,
Ali
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How can I include pom.xml dependencies in output jar???
Posted by Jo Vandermeeren <jo...@gmail.com>.
On 5/30/07, Ali Sakebi <al...@gmail.com> wrote:
>
> Thanks a lot Jo, and sorry for my question, I didn't know that it has
> been asked before. Also sorry for future questions if they are not
> good questions.
>
> What I exactly wanted was to be able to include unpacked jar files in
> lib dir (I needed it to create OSGi bundle.) Googling around I have
> founded two ways : first using
> maven-dependency-plugin:copy-dependencies and the other is:
> http://www.mail-archive.com/users@maven.apache.org/msg65534.html
>
> I would be grateful to know when/which I should use?
Hi Ali,
Don't worry, I won't bite ;)
You should use the maven-assembly-plugin.
If you are not satisfied with the predefined assemblies, you can customize
the plugin's behaviour by creating your own assembly descriptor.
First thing to do is to read up about it at:
http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html
Good luck
Jo
Re: How can I include pom.xml dependencies in output jar???
Posted by Ali Sakebi <al...@gmail.com>.
Thanks a lot Jo, and sorry for my question, I didn't know that it has
been asked before. Also sorry for future questions if they are not
good questions.
What I exactly wanted was to be able to include unpacked jar files in
lib dir (I needed it to create OSGi bundle.) Googling around I have
founded two ways : first using
maven-dependency-plugin:copy-dependencies and the other is:
http://www.mail-archive.com/users@maven.apache.org/msg65534.html
I would be grateful to know when/which I should use?
Regards,
Ali
On 5/30/07, Jo Vandermeeren <jo...@gmail.com> wrote:
> This has been asked and answered at least a hundred times on this mailing
> list.
>
> The maven-assembly-plugin can do this for you.
> http://maven.apache.org/plugins/maven-assembly-plugin/usage.html
>
> It comes down to adding this to your POM's build plugins definition:
>
> <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>
>
> Cheers
> Jo
>
> On 5/30/07, Ali Sakebi <al...@gmail.com> wrote:
> >
> > Hi
> >
> > Can some one plz guide me how can I make maven to include dependencies
> > defined in pom.xml in output jar file???
> >
> > Regards,
> > Ali
> >
> > ---------------------------------------------------------------------
> > 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: How can I include pom.xml dependencies in output jar???
Posted by Jo Vandermeeren <jo...@gmail.com>.
This has been asked and answered at least a hundred times on this mailing
list.
The maven-assembly-plugin can do this for you.
http://maven.apache.org/plugins/maven-assembly-plugin/usage.html
It comes down to adding this to your POM's build plugins definition:
<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>
Cheers
Jo
On 5/30/07, Ali Sakebi <al...@gmail.com> wrote:
>
> Hi
>
> Can some one plz guide me how can I make maven to include dependencies
> defined in pom.xml in output jar file???
>
> Regards,
> Ali
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: How can I include pom.xml dependencies in output jar???
Posted by ferry97 <vr...@yahoo.com>.
I'm trying to create a SAR file, and like to include some of dependency, is
it possible ? as the assembly did not recognize 'sar' format.
I'm using maven-sar-plugin
Ali Sakebi wrote:
>
> Hi
>
> Can some one plz guide me how can I make maven to include dependencies
> defined in pom.xml in output jar file???
>
> Regards,
> Ali
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/How-can-I-include-pom.xml-dependencies-in-output-jar----tf3839626s177.html#a14168479
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