【问题标题】:How to call Environment specific app.properties using VSTS in Maven build template如何在 Maven 构建模板中使用 VSTS 调用特定于环境的 app.properties
【发布时间】:2018-09-28 13:52:48
【问题描述】:

我正在使用 VSTS 和 Maven 构建模板为 java api 配置构建管道。如何配置特定于环境的配置(即 Dev、QA、Staging... app.properties)。

谢谢 吉里什

【问题讨论】:

    标签: maven azure-devops azure-pipelines azure-pipelines-release-pipeline azure-pipelines-build-task


    【解决方案1】:

    您可以使用profiles 来构建和打包为特定环境配置的工件。详情请见Building For Different Environments with Maven 2

    创建构建定义后,我们将配置 Maven 任务以提供pom.xml 的路径,以便构建定义可以使用pom.xml,来编译源代码并创建一个包文件。

    详情请参考Configuration of continuous build integration in VSTS

    另一个类似的帖子供您参考:Using Maven for multiple deployment environment (production/development)

    【讨论】:

    • 我已经创建了如上链接所示的配置文件。但我不确定如何运行指定的命令来获取 maven VSTS 构建组件中的相应属性文件。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-12-19
    • 2011-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-16
    • 1970-01-01
    相关资源
    最近更新 更多