小编joa*_*ura的帖子

在maven中重命名groupId

我正处于多模块Maven3项目的重构和管理过程中,我需要重命名某些工件的groupId和artifactId.

有没有办法重命名groupId和artifactId?
我知道我可以使用一些像sed这样的查找和替换工具,但我想知道是否有类似于版本maven-plugin(例如:)的mojo,mvn versions:set -DnewVersion=1.0.3-SNAPSHOT但是对于groupId和artifactId.

java refactoring maven

13
推荐指数
1
解决办法
6650
查看次数

如果找不到文件,则Ansible include_vars继续

如果我有这样的事情:

- include_vars: this_file_doesnt_exist.yml
Run Code Online (Sandbox Code Playgroud)

ansible将抛出错误"输入文件未找到..."并停止供应过程.

我想知道如果找不到文件,是否可以允许配置过程继续.

我的用例如下:

  • 尝试加载变量文件
  • 如果存在这些变量,则执行任务

例:

- include_vars: aptcacher.yml

- name: use apt-cache
  template: src=01_proxy.j2 dest=/etc/apt/apt.conf.d/01_proxy owner=root group=root mode=644
  sudo: true
  when: aptcacher_host is defined
Run Code Online (Sandbox Code Playgroud)

Ansible版本:1.9.1

ansible ansible-playbook

7
推荐指数
2
解决办法
5629
查看次数

标签 统计

ansible ×1

ansible-playbook ×1

java ×1

maven ×1

refactoring ×1