【发布时间】:2021-08-22 21:42:02
【问题描述】:
我使用 Maven 任务创建了一个 Azure 管道来构建一组 Web 应用程序。已创建工件提要,并将所需的 [repository] 和 [distributionManagement] 部分添加到根 pom 文件中,如下所示:
<repositories>
<repository>
<id>ion-wildfly-pipeline-feed</id>
<url>https://pkgs.dev.azure.com/MYFEEDNAME</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>ion-wildfly-pipeline-feed</id>
<url>https://pkgs.dev.azure.com/MYFEEDNAME</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</distributionManagement>
管道作业完成且没有错误。在工件提要中,我可以看到在构建过程中下载了很多依赖项,但生成的 .war 文件不存在。
知道我错过了什么吗? Maven build 命令的结果在哪里结束?不应该是指定的工件提要吗?
编辑以添加管道 yaml:
触发器:
- 主人
池: vmImage:ubuntu 最新版
步骤:
-
任务:Maven@3 输入: mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m -DartifactId=ion-wildfly-pipeline-feed'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
目标:“包裹”
mavenAuthenticateFeed: true
【问题讨论】:
-
Azure 管道的 YAML 是什么样的?
-
我将它添加到原始帖子中。这里不适合。这是相当标准的,虽然我确实发现我必须添加 mavenAuthenticateFeed: true
标签: azure maven azure-pipelines artifacts