atom feed2 messages in org.apache.maven.usersRe: maven-jar-plugin
FromSent OnAttachments
亢龙不悔Dec 21, 2016 3:52 am 
Curtis RuedenDec 23, 2016 6:40 am 
Subject:Re: maven-jar-plugin
From:Curtis Rueden (ctru@wisc.edu)
Date:Dec 23, 2016 6:40:54 am
List:org.apache.maven.users

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

On Wed, Dec 21, 2016 at 5:52 AM, 亢龙不悔 <1016@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>