[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-user
Subject:    Re: maven-jar-plugin
From:       Curtis Rueden <ctrueden () wisc ! edu>
Date:       2016-12-23 14:40:54
Message-ID: CADN69ynhT9udHO_jPWxP9+f5fz_esF7HODY1g29C_yADNHz=qQ () mail ! gmail ! com
[Download RAW message or body]


Hi,

> I add this plugin to my project ,but it doesn't work ,the generated
> jar package doesn't  contain dependcy jars

The maven-jar-plugin does not aggregate dependencies.

To do that, check out these plugins:

* http://maven.apache.org/plugins/maven-assembly-plugin/
* https://maven.apache.org/plugins/maven-shade-plugin/
* http://one-jar.sourceforge.net/

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden


On Wed, Dec 21, 2016 at 5:52 AM, =E4=BA=A2=E9=BE=99=E4=B8=8D=E6=82=94 <1016=
460919@qq.com> wrote:

> I add this plugin to my project ,but it doesn't work ,the generated jar
> package doesn't  contain dependcy jars
> who can help me?
>
>
> <plugin>
>                                 <groupId>org.apache.maven.
> plugins</groupId>
>                                 <artifactId>maven-jar-plugin</artifactId>
>                                 <version>2.4</version>
>                                 <configuration>
>                                         <archive>
>                                                 <manifest>
>
> <mainClass>cn.com.epicc.StartMain</mainClass>
>
> <addClasspath>true</addClasspath>
>
> <classpathPrefix>lib/</classpathPrefix>
>                                                         <
> addDefaultImplementationEntries>true</addDefaultImplementationEntries>
>                                                 </manifest>
>                                         </archive>
>                                         <classesDirectory>
>                                         </classesDirectory>
>                                 </configuration>
>                         </plugin>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic