当我尝试使用 maven 部署到 CloudHub 时出现以下错误:
Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:2.3.13:test (test) on
project gglobal-reverselogic-notifications: Build Failed: There was an error running M
Unit tests -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
com.mulesoft.munit.tools:munit-maven-plugin:2.3.13:test
这是我的 pom 文件:
<app.runtime>4.4.0</app.runtime>
<mule.maven.plugin.version>3.8.0</mule.maven.plugin.version>
<munit.version>2.3.14</munit.version>
<dependencies>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-http-connector</artifactId>
<version>1.7.3</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-sockets-connector</artifactId>
<version>1.2.3</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.5.3</version>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-objectstore-connector</artifactId>
<version>1.2.1</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule-mongodb-connector</artifactId>
<version>6.3.7</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-legacy</artifactId>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>org.mule.connectors</groupId>
<artifactId>mule-db-connector</artifactId>
<version>1.14.1</version>
<classifier>mule-plugin</classifier>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-runner</artifactId>
<version>2.3.13</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.munit</groupId>
<artifactId>munit-tools</artifactId>
<version>2.3.13</version>
<classifier>mule-plugin</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mule.weave</groupId>
<artifactId>assertions</artifactId>
<version>1.0.2</version>
<scope>test</scope>
</dependency>
</dependencies>
我正在阅读互联网上的博客,发现我需要将以下依赖项放入我的 pom 文件中
com.mulesoft.wave
但是当我放置依赖项时,它在 Anypoint Studion 中显示错误,它不存在...
当前使用版本:Mule 4.4.0 和 Maven:3.8.6,我也将 Mule 更改为 4.3.0,但它显示了同样的问题。
你能帮帮我吗?
致以最诚挚的问候!
请注意,错误不会发生在部署到 CloudHub 上,而是在执行 MUnit 时的测试阶段:
Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:2.3.13:test (test
错误没有提供出错的详细信息,但是您似乎添加的依赖项很可能是 Mule 3.x 的 DataWeave 库:
<groupId>com.mulesoft.weave</groupId>
<artifactId>mule-plugin-weave</artifactId>
这不是您应该添加到 Mule 4 应用程序项目中的依赖项。没有理由将它添加到您的 Mule 4 项目中。只需删除该依赖项即可。