地址:http://code.google.com/p/maven-fatjar-plugin/
JAR Layout
Archive a fat jar with all the dependencies, so that you can inplace run or use the jar if you haven't maven repository. Following is an example:
xx.jar
|-META-INF
|-maven
|-MENIFEST.MF
|-lib
|-a.jar
|-b.jar
and the MENIFEST.MF is like this:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: Administrator
Build-Jdk: 1.5.0_12
Extension-Name: eaf-service-impl
Implementation-Title: eaf-service-impl
Implementation-Version: 0.0.1-SNAPSHOT
Class-Path: lib/a.jar lib/b.jar
Usage
in your pom.xml, add following:
<properties>
<deployDir>D:\jboss\server\all\deploy</deployDir>
</properties>
<build>
<plugins>
....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-fatjar-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<id>fatjar</id>
<phase>package</phase>
<goals>
<goal>fatjar</goal>
</goals>
</execution>
</executions>
<configuration>
<classpathPrefix>lib</classpathPrefix>
<deployDirectory>${deployDir}</deployDirectory>
</configuration>
</plugin>
...
</plugins>
</build>
分享到:
相关推荐
maven-fatjar-plugin-1.0.0.jar
maven-fatjar-plugin-1.0.0-sources.jar
maven-jar-plugin-3.1.1.jar
maven-jar-plugin-2.6.jar。解决maven官网上下载不下来或者下载速度慢的问题。
maven-resources-plugin-2.4.1.jar
maven-deploy-plugin-2.8.2.jar
maven-site-plugin-3.3.jar
maven-antrun-plugin-3.0.0.jar
maven-jar-plugin-2.3.2.jar
maven-clean-plugin-3.1.0.jar
maven-deploy-plugin-2.7.jar
修改版tomcat7-maven-plugin-2.2.jar
maven-project-info-reports-plugin-2.2.jar
解决tomcat8-maven-plugin-3.0-r1655215.jar阿里云同有的问题。放到路径org\apache\tomcat\maven\tomcat8-maven-plugin\3.0-r1655215\就可以了
maven是个项目管理工具,如果我们不告诉它我们的代码要使用什么样的jdk版本编译的话,它就会用maven-compiler-plugin默认的jdk版本来进行处理,这样就容易出现版本不匹配,以至于可能导致编译不通过的问题。...
maven-surefire-plugin-2.7.1.jar
maven-install-plugin-2.5.2.jar
maven-install-plugin-2.4.jar
maven-plugin-parameter-documenter-2.0.jar
maven-resources-plugin-3.1.0.jar