只装父pom跳过子
命令行
mvn -N install
-N,--non-recursive Do not recurse into sub-projects
usage: mvn [options] [<goal(s)>] [<phase(s)>]
eclipse
跳过测试
mvn install -DskipTests
http://maven.apache.org/surefire/maven-surefire-plugin/examples/skipping-test.html
构建指定模块
Options: -f,--file <arg> Force the use of an alternate POM file (or directory with pom.xml)
D:\zp>mvn clean
[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] zp [pom] [INFO] zm1 [jar] [INFO] zm2 [jar] [INFO] [INFO] -----------------------------< cn.zno:zp >------------------------------ [INFO] Building zp 0.0.1-SNAPSHOT [1/3] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zp --- [INFO] [INFO] -----------------------------< cn.zno:zm1 >----------------------------- [INFO] Building zm1 0.0.1-SNAPSHOT [2/3] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zm1 --- [INFO] Deleting D:\zp\zm1\target [INFO] [INFO] -----------------------------< cn.zno:zm2 >----------------------------- [INFO] Building zm2 0.0.1-SNAPSHOT [3/3] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zm2 --- [INFO] Deleting D:\zp\zm2\target [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for zp 0.0.1-SNAPSHOT: [INFO] [INFO] zp ................................................. SUCCESS [ 0.206 s] [INFO] zm1 ................................................ SUCCESS [ 0.029 s] [INFO] zm2 ................................................ SUCCESS [ 0.032 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.454 s [INFO] Finished at: 2022-03-10T11:10:16+08:00 [INFO] ------------------------------------------------------------------------
D:\zp>mvn -f zm1/pom.xml clean
[INFO] Scanning for projects... [INFO] [INFO] -----------------------------< cn.zno:zm1 >----------------------------- [INFO] Building zm1 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zm1 --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.332 s [INFO] Finished at: 2022-03-10T11:10:35+08:00 [INFO] ------------------------------------------------------------------------
标签:INFO,------------------------------------------------------------------------,只装 From: https://www.cnblogs.com/zno2/p/6473189.html