Bri*_*ett 5 build-process maven-2 build jenkins
我在 pom.xml 中配置了以下过滤器:
<build>
...
<filters>
<filter>build.properties</filter>
<filter>user.properties</filter>
</filters>
...
</build>
Run Code Online (Sandbox Code Playgroud)
build.properties
包含为生产构建 web 应用程序时使用的过滤器。 user.properties
是用户覆盖为build.properties
本地部署和测试配置的过滤器的地方(例如,servername=localhost
而不是servername=productionserver.com
)。
user.properties
不存储在源代码管理中,因为它对于每个开发人员来说都是本地的。当我们使用 Jenkins 构建 Web 应用程序时,它失败并显示“加载属性文件时出错”。
有没有办法将过滤器指定为可选,或者告诉 Maven 忽略缺失的过滤器?
查看为服务器构建和开发人员工作站构建设置不同的 Maven 构建配置文件
归档时间: |
|
查看次数: |
1718 次 |
最近记录: |