<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <artifactId>tddl-all</artifactId> <groupId>com.taobao.tddl</groupId> <version>3.2-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>tddl_sample</artifactId> <name>tddl_sample v${project.version}</name> <dependencies> <dependency> <groupId>${pom.groupId}</groupId> <artifactId>tddl-client</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <appendAssemblyId>false</appendAssemblyId> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.chenzhou.examples.Main</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>assembly</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
mvn assembly:single -Dmaven.test.skip 全部打到一个包里面
mvn assembly:assembly -Dmaven.test.skip 源码单独包