我想根据几个文件的存在激活一个配置文件.在下面的例子中,我想配置文件将被激活,如果这两个文件my.marker
和another.marker
存在.
<activation>
<file>
<exists>${basedir}/my.marker</exists>
<exists>${basedir}/another.marker</exists>
</file>
</activation>
Run Code Online (Sandbox Code Playgroud)
它不起作用,因为它对模式无效.有没有办法在不使用命令行属性的情况下做这样的事情?
实际上,即使在 Maven 3.2.2 中解决了 MNG-4565,仍然无法检查多个文件的存在。这是因为 POM 模型不允许多个file
或多个exists
元素(https://issues.apache.org/jira/browse/MNG-5909)。即使混合exists
和missing
在一个file
元素中也不起作用(因为如果exists
元素在那里,它将只被考虑而兄弟missing
元素将被忽略,https://issues.apache.org/jira/browse/MNG-5910)
归档时间: |
|
查看次数: |
2972 次 |
最近记录: |