我正在尝试定义仅在两个条件适合的情况下激活的配置文件:
正确的操作系统
<profile>
<id>test</id>
<activation>
<file>
<exists>file</exists>
</file>
<os>
<family>windows/unix/etc...</family>
</os>
</activation>
</profile>
我尝试以这种方式定义它,但是如果操作系统匹配,则激活配置文件,即使该文件夹也不存在。但是我希望在文件夹存在的情况下运行一些插件,以防操作系统必须匹配二进制文件。
提前致谢..
答案 0 :(得分:3)
据Maven JIRA称,这是一个悬而未决的问题:http://jira.codehaus.org/browse/MNG-4565
上述链接问题的评论指向提供您正在寻找的功能的Maven扩展程序:https://github.com/johnjcool/and-activation-profile-selector