我有这样的代码添加到我的类路径:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<mainClass>ApuestaYa</mainClass>
</manifest>
<manifestEntries>
<Class-path>../lib/jcalendar.jar ../lib/eclipselink.jar ../lib/libforms-1.3.0.jar ../lib/Imagenes.jar ../lib/DriverPersistencia.jar ../lib/javax.persistence_2.0.3.v201010191057.jar</Class-path>
</manifestEntries>
</archive>
</configuration>
</plugin>
但我在MANIFEST.MF得到这个:
Manifest-Version: 1.0
Implementation-Title: Apuestaya
Implementation-Version: 0.9.0-SNAPSHOT
Implementation-Vendor-Id: um.tds.VictorMRuiz
Built-By: Celor
Build-Jdk: 1.7.0_09
Class-Path: ../lib/jcalendar.jar ../lib/eclipselink.jar ../lib/libform
s-1.3.0.jar ../lib/Imagenes.jar ../lib/DriverPersistencia.jar ../lib/
javax.persistence_2.0.3.v201010191057.jar
Created-By: Apache Maven 3.0.4
Main-Class: ApuestaYa
Archiver-Version: Plexus Archiver
正如你所看到的,Maven的放在罐子里的路线随机空格。 例如:../lib/libform S-1.3.0.Jar ......所以,当我吃午饭英里罐子我得到一个错误,因为它无法找到罐子。 有任何想法吗?