MANIFEST.MF文件裡面的信息:
Manifest-Version: 1.0
Built-By: Administrator
Build-Jdk: 1.6.0_10-rc2
Class-Path: lib/storage-1.0-20131202.054649-56.jar lib/compframe-1.0-2 0131202.072442-8.jar
實際下載到lib目錄中的是storage-1.0--SNAPSHOT.jar這樣。
pom文件:
...
org.apache.maven.plugins
maven-compiler-plugin
3.0
lib
UTF-8
<!-- 設置程序入口類,並設置依賴目錄 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib</classpathPrefix>
<mainClass>main.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<!-- 設置依賴庫到打包生成目錄下的lib目錄 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/lib
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
...
換個Maven版本試試看。。