简体   繁体   English

azure-devops 中的 Maven 配置

[英]Maven Configuration in azure-devops

I have installed maven 3.6.3 on ubuntu 18.04 azure hosted agent.我已经在 ubuntu 18.04 azure 托管代理上安装了 maven 3.6.3。 How can I setup a MAVEN_HOME and path in Microsoft hosted agent and how can I edit settings.xml如何在 Microsoft 托管代理中设置 MAVEN_HOME 和路径以及如何编辑 settings.xml

I added below parameters in azure-pipelines.yml (under maven task) mavenVersionOption: 'Path' mavenDirectory: '$(build.sourcesdirectory)/maven/apache-maven-3.6.3' mavenSetM2Home: true我在 azure-pipelines.yml 中添加了以下参数(在 maven 任务下) mavenVersionOption: 'Path' mavenDirectory: '$(build.sourcesdirectory)/maven/apache-maven-3.6.3' mavenSetM2Home: true

What other configurations do I need to do here and how can I add the contents in settings.xml.我这里还需要做哪些其他配置,如何在settings.xml中添加内容。

Any help would be much appreciated任何帮助将非常感激

You can create your own settings.xml which has all custom configs and reference it in your pipeline by calling mvn clean package -s settings.xml您可以创建自己的 settings.xml,它具有所有自定义配置,并通过调用mvn clean package -s settings.xml在您的管道中引用它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM