执行顺序:
1、使用清理插件:maven-clean-plugin:2.5执行清理删除已有target目录(版本2.5);
2、使用资源插件:maven-resources-plugin:2.6执行资源文件的处理(版本2.6);
3、使用编译插件:maven-compiler-plugin:3.1编译所有源文件生成class文件至targetclasses目录下(版本3.1);
4、使用资源插件:maven-resources-plugin:2.6执行测试资源文件的处理(版本2.6);
5、使用编译插件:maven-compiler-plugin:3.1编译测试目录下的所有源代码(版本3.1);
6、使用插件:maven-surefire-plugin:2.12运行测试用例(版本2.12);
<!-- 打包工具配置 --> <build> <plugins> <!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.6</version> <configuration> <archive> <manifest> <mainClass>com.obim.sendclient.begin.Run</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin>--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>1.5.6.RELEASE</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
命令:mvn clean package