-
Java maven反应堆构建学习实践
实践环境
Apache Maven 3.0.5 (Red Hat 3.0.5-17)
应用示例
示例项目结构
maven示例项目组织结构如下
maven-study
│ pom.xml
│
├─first-sub-module
│ │ pom.xml
│ │
│ ├─src
│ │ ├─main
│ │ │ └─java
│ │ │ └─com
│ │ │ └─shouke
│ │ │ └─mvnstudy
│ │ │ HelloMaven.java
│ │ │
│ │ └─test
│ │ └─java
│ │ └─com
│ │ └─shouke
│ │ └─mvnstudy
│ │ TestHelloMaven.java
│ │
│ └─sub-sub-module
│ │ pom.xml
│ │
│ └─src
│ ├─main
│ │ └─java
│ │ └─com
│ │ └─shouke
│ │ └─mvnstudy
│ │ HelloMaven.java
│ │
│ └─test
│ └─java
│ └─com
│ └─shouke
│ └─mvnstudy
│ TestHelloMaven.java
│
└─second-sub-module
│ pom.xml
│
└─src
├─main
│ └─java
│ └─com
│ └─shouke
│ └─mvnstudy
│ HelloMaven.java
│
└─test
└─java
└─com
└─shouke
└─mvnstudy
TestHelloMaven.java
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>parent-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<modules>
<module>first-sub-module</module>
<module>second-sub-module</module>
</modules>
</project>
</xml>
first-sub-module/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>first-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>second-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>sub-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<parent>
<groupId>com.shouke.mvnstudy</groupId>
<!--父项目id-->
<artifactId>parent-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
</project>
</xml>
first-sub-module/sub-sub-module/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>sub-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
</xml>
second-sub-module/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>second-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<parent>
<groupId>com.shouke.mvnstudy</groupId>
<!--父项目id-->
<artifactId>parent-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
</project>
</xml>
学习实践
-pl
选项应用
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl first-sub-module compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building first-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.219s
[INFO] Finished at: Fri Dec 24 11:20:23 CST 2021
[INFO] Final Memory: 17M/1447M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project first-sub-module: Could not resolve dependencies for project com.shouke.mvnstudy:first-sub-module:jar:1.0.0-SNAPSHOT: Could not find artifact com.shouke.mvnstudy:second-sub-module:jar:1.0.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
-am
选项应用
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl first-sub-module -am compile
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent-module
[INFO] second-sub-module
[INFO] first-sub-module
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building parent-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ parent-module ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building second-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ second-sub-module ---
[INFO] Deleting /root/maven-study/second-sub-module/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ second-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/second-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ second-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/second-sub-module/target/classes
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building first-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ first-sub-module ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ first-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/first-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ first-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/first-sub-module/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent-module ..................................... SUCCESS [0.146s]
[INFO] second-sub-module ................................. SUCCESS [0.576s]
[INFO] first-sub-module .................................. SUCCESS [0.346s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.187s
[INFO] Finished at: Fri Dec 24 11:22:06 CST 2021
[INFO] Final Memory: 22M/1096M
[INFO] ------------------------------------------------------------------------
-amd
选项应用
对比示例
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl second-sub-module compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building second-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ second-sub-module ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ second-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/second-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ second-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/second-sub-module/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.976s
[INFO] Finished at: Fri Dec 24 11:21:18 CST 2021
[INFO] Final Memory: 23M/1447M
[INFO] ------------------------------------------------------------------------
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl second-sub-module -am compile
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent-module
[INFO] second-sub-module
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building parent-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ parent-module ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building second-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ second-sub-module ---
[INFO] Deleting /root/maven-study/second-sub-module/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ second-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/second-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ second-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/second-sub-module/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent-module ..................................... SUCCESS [0.132s]
[INFO] second-sub-module ................................. SUCCESS [0.536s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.771s
[INFO] Finished at: Fri Dec 24 11:24:13 CST 2021
[INFO] Final Memory: 23M/1447M
[INFO] ------------------------------------------------------------------------
-amd
应用示例
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl second-sub-module -amd compile
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] second-sub-module
[INFO] first-sub-module
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building second-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ second-sub-module ---
[INFO] Deleting /root/maven-study/second-sub-module/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ second-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/second-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ second-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/second-sub-module/target/classes
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building first-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ first-sub-module ---
[INFO] Deleting /root/maven-study/first-sub-module/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ first-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/first-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ first-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/first-sub-module/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] second-sub-module ................................. SUCCESS [0.652s]
[INFO] first-sub-module .................................. SUCCESS [0.344s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.100s
[INFO] Finished at: Fri Dec 24 11:24:33 CST 2021
[INFO] Final Memory: 24M/1157M
[INFO] ------------------------------------------------------------------------
嵌套子模块构建
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl first-sub-module/sub-sub-module compile
[INFO] Scanning for projects...
[ERROR] Could not find the selected project in the reactor: first-sub-module/sub-sub-module -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
修改first-sub-module/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>first-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>second-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<parent>
<groupId>com.shouke.mvnstudy</groupId>
<!--父项目id-->
<artifactId>parent-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modules>
<module>sub-sub-module</module>
</modules>
</project>
</xml>
修改first-sub-module/sub-sub-module/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>sub-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<parent>
<groupId>com.shouke.mvnstudy</groupId>
<!--父项目id-->
<artifactId>first-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
</project>
</xml>
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl first-sub-module/sub-sub-module -am compile
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent-module
[INFO] second-sub-module
[INFO] first-sub-module
[INFO] sub-sub-module
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building parent-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ parent-module ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building second-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ second-sub-module ---
[INFO] Deleting /root/maven-study/second-sub-module/target
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ second-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/second-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ second-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/second-sub-module/target/classes
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building first-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ first-sub-module ---
[INFO] Deleting /root/maven-study/first-sub-module/target
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sub-sub-module 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ sub-sub-module ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ sub-sub-module ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/maven-study/first-sub-module/sub-sub-module/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ sub-sub-module ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /root/maven-study/first-sub-module/sub-sub-module/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] parent-module ..................................... SUCCESS [0.148s]
[INFO] second-sub-module ................................. SUCCESS [0.728s]
[INFO] first-sub-module .................................. SUCCESS [0.005s]
[INFO] sub-sub-module .................................... SUCCESS [0.370s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.370s
[INFO] Finished at: Fri Dec 24 11:39:07 CST 2021
[INFO] Final Memory: 22M/1098M
[INFO] ------------------------------------------------------------------------
结论
注意-pl
只适用在“父子”结构的项目中,构建子项目
针对以上结论,修改相关pom.xml
,再次测试验证
修改pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>parent-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
</xml>
修改second-sub-module/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shouke.mvnstudy</groupId>
<artifactId>second-sub-module</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<!-- junit 依赖 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
</xml>
# mvn clean -Dautoconfig.skip=true -Dmaven.test.skip=true -pl second-sub-module compile
[INFO] Scanning for projects...
[ERROR] Could not find the selected project in the reactor: second-sub-module -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
如上,提示找不到模块。
-------------------------------文字太少,占位符---------------------------------
-------------------------------文字太少,占位符---------------------------------
作者:授客
本文版权归原作者所有,仅供学习参考之用,转载请注明出处:https://www.cnblogs.com/shouke/p/15758382.html,未经作者允许请务必保留此段声明!
最新更新
带有参数的装饰器
类装饰器
django中的auth模块与admin后台管理
python的日期处理
字符串常用方法
基本数据类型概述
python-map()函数基本用法
python带你实现任意下载AcFun视频数据~
bbs项目之注册功能
变量的定义和使用
三大常用数据库事务详解之三:事务运行
三大常用关系型数据库事务详解之二:基
三大关系型数据库事务详解之一:基本概
MongoDB常用命令(2)
MongoDB基本介绍与安装(1)
SQLServer触发器调用JavaWeb接口
SQL Server索引的原理深入解析
SqlServer2016模糊匹配的三种方式及效率问题
SQL中Truncate的用法
sqlserver 多表关联时在where语句中慎用tri
VB.NET中如何快速访问注册表
ASP.NET中图象处理过程详解
Vue(1)Vue安装与使用
JavaScript 语言入门
js将一段字符串的首字母转成大写
纯原生html编写的h5视频播放器
H5仿原生app短信验证码vue2.0组件附源码地
TypeScript(4)接口
TypeScript(3)基础类型
TypeScript(2)WebStorm自动编译TypeScript配置