maven 单独构建多模块项目中的单个模块

时间:2021-09-20 13:41:13

maven 单独构建多模块项目中的单个模块, maven选项说明

-pl, --projects
Build specified reactor projects instead of all projects
-am, --also-make
If project list is specified, also build projects required by the list
-amd, --also-make-dependents
If project list is specified, also build projects that depend on projects on the list

单独构建ielong-wx

$ mvn install -pl ielong-wx -am

单独构建ielong-common及依赖ielong-common的模块

$ mvn install -pl ielong-common -am -amd

如何跳过测试

mvn clean package -Pvue -Dmaven.test.skip=true

如何获取当前的profile

@Autowired
private Environment environment; String profile = environment.getProperty("spring.profiles.active"); if(GlobalConst.PROFILE_PRD.equals(profile)){
}
else {
}

hosts,DNS如何配置

  • hosts: /etc/hosts
  • DNS: /etc/resolv.conf

参考文档