mulesoft - 在 Azure devops 上部署项目时 Munit 不工作,但它在 APS 中工作?
问题描述
大家好,我得到了“在 maven-central 中找不到工件 com.mulesoft.mule.distributions:mule-runtime-impl-bom:pom:4.1.5 ( https://repo.maven.apache.org/maven2/ )"
我从 yaml 中将其称为“ mvn test -Dmunit.test=test-suite.xml”
请在我的 pom.xml 下方找到 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.accenture</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>dataweave-2-basics</artifactId>
<packaging>mule-application</packaging>
<name>dataweave-2-basics</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<cloudhubusername>${envusername}</cloudhubusername>
<cloudhubpassword>${envpassword}</cloudhubpassword>
<app.runtime>4.2.0</app.runtime>
<mule.maven.plugin.version>3.2.7</mule.maven.plugin.version>
<munit.version>2.2.4</munit.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>${mule.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<cloudHubDeployment>
<uri>https://anypoint.mulesoft.com</uri>
<!--<deploymentType>cloudhub</deploymentType>-->
<applicationName>${cloudhubAppName}</applicationName>
<muleVersion>4.2.0</muleVersion>
<username>${cloudhubusername}</username>
<password>${cloudhubpassword}</password>
<workerType>Micro</workerType>
<!-- <redeploy>true</redeploy> -->
<environment>Sandbox</environment>
</cloudHubDeployment>
<classifier>mule-application</classifier>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<classifier>mule-application</classifier>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mulesoft.munit.tools</groupId>
<artifactId>munit-maven-plugin</artifactId>
<version>${munit.version}</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
<goal>coverage-report</goal>
</goals>
</execution>
</executions>
<configuration>
<coverage>
<runCoverage>true</runCoverage>
<formats>
<format>html</format>
</formats>
</coverage>
<runtimeVersion>4.1.5</runtimeVersion>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-http-connector</artifactId>
<version>1.3.2</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-sockets-connector</artifactId>
<version>1.1.2</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-file-connector</artifactId>
<version>1.2.0</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>${munit.version}</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>anypoint-exchange</id>
<name>Anypoint Exchange</name>
<url>https://maven.anypoint.mulesoft.com/api/v1/maven</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>https://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-snapshots</id>
<name>MuleSoft Snapshots Repository</name>
<url>https://repository.mulesoft.org/snapshots/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-releases</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>http://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>mulesoft-snapshots</id>
<name>mulesoft snapshots repository</name>
<layout>default</layout>
<url>http://repository.mulesoft.org/snapshots/</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>anypoint-exchange</id>
<name>Anypoint Exchange</name>
<url>https://maven.anypoint.mulesoft.com/api/v1/maven</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<id>mulesoft-snapshots</id>
<name>MuleSoft Snapshot Repository</name>
<url>https://repository-master.mulesoft.org/snapshots/</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
</project>
解决方案
该工件位于 MuleSoft Enterprise 存储库中。有关如何添加存储库的说明,请参阅https://docs.mulesoft.com/mule-runtime/3.9/configuring-maven-to-work-with-mule-esb#referencing-mulesofts-enterprise-repositories 。
请注意,您必须是 MuleSoft 的客户才能拥有 Enterprise 存储库的凭据。
更新:这篇知识库文章提到了这个问题:https ://help.mulesoft.com/s/article/Unable-to-find-the-dependency-com-mulesoft-mule-distributions-mule-runtime-impl-bom-pom -当通过 Maven 构建时
推荐阅读
- gmail-api - How to get all unique email recipients python gmail api
- jenkins - Jenkins : Copy artifacts from one agent to another from last stage
- oracle - Training schedule till end of year
- reactjs - React Router , pagination with query string
- python - Cannot Deploy Python Telegram Conversation Bot to Heroku
- git - 由于忘记将文件名放在 git ignore 中,意外留下了 API 密钥,如何从删除提交中清除密钥?
- pine-script - Tradingview pinescript plotsymbol
- c# - Autofac 正在解析重复的实例
- html - 在jQuery上用img src替换div背景url
- javascript - 选择特定选项时如何重置选择