Hello. I'm using maven-jar-plugin with "addClasspath" setting to true. The META-INF/MANIFEST.MF file is being created fine (with the correct Class-path value). My application needs several resources which should be added to the classpath.
I have attempted to add resource folder in the "<manifestEntries>" tag, my pom seems like: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <index>false</index> <manifest> <mainClass>path.to.my.MainClass</mainClass> <addClasspath>true</addClasspath> <classpathPrefix>lib</classpathPrefix> </manifest> <manifestEntries> <Class-Path>resources</Class-Path> </manifestEntries> </archive> </configuration> </plugin> When I add the "manifestEntries" the generated META-INF/MANIFEST.MF has got two class-path enties: Main-Class: path.to.my.MainClass Class-Path: lib/lib1.jar lib/lib2.jar Class-Path: resources When I run the app I recieved the warning: "Duplicate name in Manifest: Class-Path" and only the last "Class-Path" is added to the applicacion classpath. Any idea to fix this problem? i hope you can understand me, i know my english isn't very good. Thanks in advance!!