使用assembly将maven项目pom.xml中的jar包打包

来源:互联网 发布:手游编程用什么语言 编辑:程序博客网 时间:2024/05/20 15:37

参考 http://www.cnblogs.com/enshrineZither/p/3402616.html

但最好是在pom.xml中替换以下代码:

 <build>        <plugins><plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin>            <plugin>                <artifactId>maven-assembly-plugin</artifactId>                <configuration>                    <descriptorRefs>                        <descriptorRef>jar-with-dependencies</descriptorRef>                    </descriptorRefs>                </configuration>            </plugin>        </plugins>    </build>  <dependencies>

然后使用mvn assembly:assembly 进行打包

0 0
原创粉丝点击