Azure Pipeline执行但未能部署m子应用程序

发布于 2025-02-08 19:16:18 字数 2711 浏览 1 评论 0 原文

我正在尝试使用Azure Pipeline

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'
variables:
- group: Build-Variable-Group
- name: MAVEN_CACHE_FOLDER
  value: $(Pipeline.Workspace)/.m2/repository
- name: MAVEN_OPTS
  value: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'


steps:

- task: CacheBeta@0
  inputs:
    key: pom.xml
    path: $(MAVEN_CACHE_FOLDER)
  displayName: Cache Maven local Repo

- task: DownloadSecureFile@1
  name: settingsxml
  inputs:
    secureFile: 'settings.xml'

- task: Powershell@2
  inputs:
    targetType: 'inline'
    script: |
        New-Item -Type Directory -Force "${HOME}/.m2"
        Copy-Item -Force "$(settingsxml.secureFilePath)" "${HOME}/.m2/settings.xml"
        
        

- task: Maven@3
  inputs:
    mavenPomFile: 'pom.xml'
    mavenOptions: '-Xmx3072m'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    mavenAuthenticateFeed: true
    publishJUnitResults: false
    javaHomeOption: 'JDKVersion'
    mavenVersionOption: 'Default'
    effectivePomSkip: true
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: 'clean install package deploy $(MAVEN_OPTS) -DmuleDeploy -Dserver=$(server) -Denvironment=$(environment) -Dworkers=$(workers) -DworkerType=$(workerType) -Dapp.runtime=$(app.runtime) -Dapp.name=$(app.name)'
    
  
- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'
- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Pipeline.Workspace)'
    publishLocation: 'pipeline'

azure.pipeline.yaml

来部署应用程序:

引起的:java.lang.illegalstateException:部署失败 2022-06-20T07:15:42.3435274z at org.mule.tools.verification.cloudhub.cloudhubdeploymentverification $ CloudHubDeploymentVerificationTrategy.lambda $ isDeployed $ 0 (CloudHubDeploymentVerification.java:56)

即使在m子日志中获取以下错误:

om.mulesoft.ch.services.agent.muleagent.muleagentException: {“ type”:“类Java.lang.illegalgumentException”,“ message”:“那里 部署应用程序时是m子运行时的错误 clx-salesforceupsert-ifa。错误:无法部署工件 [clx-salesforceupsert-ifa]。 saxexception:无法解决 , 依赖关系或插件可能缺少“}

I am trying to deploy an app using Azure pipeline

azure.pipeline.yaml

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'
variables:
- group: Build-Variable-Group
- name: MAVEN_CACHE_FOLDER
  value: $(Pipeline.Workspace)/.m2/repository
- name: MAVEN_OPTS
  value: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'


steps:

- task: CacheBeta@0
  inputs:
    key: pom.xml
    path: $(MAVEN_CACHE_FOLDER)
  displayName: Cache Maven local Repo

- task: DownloadSecureFile@1
  name: settingsxml
  inputs:
    secureFile: 'settings.xml'

- task: Powershell@2
  inputs:
    targetType: 'inline'
    script: |
        New-Item -Type Directory -Force "${HOME}/.m2"
        Copy-Item -Force "$(settingsxml.secureFilePath)" "${HOME}/.m2/settings.xml"
        
        

- task: Maven@3
  inputs:
    mavenPomFile: 'pom.xml'
    mavenOptions: '-Xmx3072m'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    mavenAuthenticateFeed: true
    publishJUnitResults: false
    javaHomeOption: 'JDKVersion'
    mavenVersionOption: 'Default'
    effectivePomSkip: true
    testResultsFiles: '**/surefire-reports/TEST-*.xml'
    goals: 'clean install package deploy $(MAVEN_OPTS) -DmuleDeploy -Dserver=$(server) -Denvironment=$(environment) -Dworkers=$(workers) -DworkerType=$(workerType) -Dapp.runtime=$(app.runtime) -Dapp.name=$(app.name)'
    
  
- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'
- task: PublishPipelineArtifact@1
  inputs:
    targetPath: '$(Pipeline.Workspace)'
    publishLocation: 'pipeline'

but getting this error :

Caused by: java.lang.IllegalStateException: Deployment failed
2022-06-20T07:15:42.3435274Z at
org.mule.tools.verification.cloudhub.CloudHubDeploymentVerification$CloudHubDeploymentVerificationStrategy.lambda$isDeployed$0
(CloudHubDeploymentVerification.java:56)

even in mule log getting the following error :

om.mulesoft.ch.services.agent.muleAgent.MuleAgentException:
{"type":"class java.lang.IllegalArgumentException","message":"There
was an error on the Mule Runtime while deploying the application
clx-salesforceupsert-ifa. Error: Failed to deploy artifact
[clx-salesforceupsert-ifa]. SAXException: Can't resolve
http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd,
A dependency or plugin might be missing"}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苍风燃霜 2025-02-15 19:16:18

错误消息指向问题:

Can't resolve http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd, A dependency or plugin might be missing"}

应用程序使用Salesforce连接器,但POM缺少其依赖性。参见有关如何添加它的说明。

这个问题是关于用Maven构建m子应用程序,与Azure管道没有任何关系。

The error message points to the problem:

Can't resolve http://www.mulesoft.org/schema/mule/salesforce/current/mule-salesforce.xsd, A dependency or plugin might be missing"}

The application uses the Salesforce connector but the pom is missing the dependency for it. See https://docs.mulesoft.com/salesforce-connector/10.15/salesforce-connector-xml-maven for instructions on how to add it.

This issue is about building the Mule application with Maven without any relationship to the Azure pipeline.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文