简体   繁体   English

Pipeline for a java based web app on azure devops.Apache maven to create build. 下面 yaml 代码和 output 错误我得到

[英]Pipeline for a java based web app on azure devops.Apache maven to create build . Below yaml code and the output error i'm getting

trigger:
- master

pool:
  vmImage: ubuntu-latest

steps:
- task: Maven@3
  inputs:
    mavenPomFile: 'smart-test-admin-api/pom.xml'
    mavenOptions: '-Xmx3072m'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: true
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: 'package'

BUILD ERROR: [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Malformed POM /home/vsts/work/1/s/smart-test-admin-api/pom.xml: Unrecognised tag: 'repositories' (position: START_TAG seen...\n... @17:19) @ /home/vsts/work/1/s/smart-test-admin-api/pom.xml, line 17, column 19 @ [ERROR] The build could not read 1 project -> [Help 1]构建错误:[错误] [错误] 处理 POM 时遇到一些问题:[错误] 格式错误的 POM /home/vsts/work/1/s/smart-test-admin-api/pom.xml:无法识别的标签:'存储库'(位置:START_TAG 看到...\n...@17:19)@ /home/vsts/work/1/s/smart-test-admin-api/pom.xml,第 17 行,第 19 列 @ [错误] 构建无法读取 1 个项目 -> [帮助 1]

Malformed POM /home/vsts/work/1/s/smart-test-admin-api/pom.xml: Unrecognised tag: 'repositories' (position: START_TAG seen...\n... @17:19)格式错误的 POM /home/vsts/work/1/s/smart-test-admin-api/pom.xml:无法识别的标签:“存储库”(位置:已看到 START_TAG...\n...@17:19)

Based on the error message, this issue is from the Pom.xml.根据错误消息,此问题来自 Pom.xml。 The format of the repositories field in Pom.xml file has some issue. Pom.xml 文件中存储库字段的格式存在一些问题。

Here is the correct format sample: you could refer to it and check your content format of the Pom.xml file.这是正确的格式示例:您可以参考它并检查 Pom.xml 文件的内容格式。

<project>
...
  <repositories>
    <repository>
      <id>my-repo1</id>
      <name>your custom repo</name>
      <url>http://jarsm2.dyndns.dk</url>
    </repository>
    <repository>
      <id>my-repo2</id>
      <name>your custom repo</name>
      <url>http://jarsm2.dyndns.dk</url>
    </repository>
  </repositories>
...
</project>

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

相关问题 Azure DevOps Pipeline 中的 Maven 构建错误 - Maven build error in Azure DevOps Pipeline 如何使用 Azure DevOps 在 YAML 管道中输出替换令牌? - How can I output the replacetokens in a YAML pipeline with Azure DevOps? 如何在 Azure Devops 中为多模块 maven 创建构建管道 - How to create a build pipeline for multi-module maven in Azure Devops 请参阅使用 YAML 管道在 Azure DevOps 中构建工件 - See Build Artifacts in Azure DevOps with YAML Pipeline Azure devops使用Yaml文件无法构建管道 - Azure devops build pipeline with yaml file not working Azure DevOps 管道 - YAML 格式错误? - Azure DevOps Pipeline - YAML formatting error? YAML Azure DevOps 管道上的解析器错误 - YAML Parser error on Azure DevOps Pipeline Azure Devops 管道返回:'无法将 web package 部署到应用服务。 内部服务器错误(代码:500)' - Azure Devops Pipeline returning: 'Failed to deploy web package to App Service. Internal Server Error (CODE: 500)' 有没有办法使用 Azure Devops 将 yaml 构建管道转换为发布管道? - Is there a way to translate a yaml build pipeline to a release pipeline using Azure Devops? Azure DevOps - 在 Azure YAML 管道的 React 构建中删除文件夹为空 - Azure DevOps - Drop folder empty in React build for Azure YAML pipeline
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM