简体   繁体   English

Mulesoft Maven 配置错误。 无法从终端部署到 Cloudhub

[英]Mulesoft Maven configuration error. Can't depoloy to Cloudhub from terminal

I am trying to deploy my mule project from Anypoint using terminal "mvn clean package deploy-DmuleDeploy" command.我正在尝试使用终端“mvn clean package deploy-DmuleDeploy”命令从 Anypoint 部署我的 mule 项目。 I am not sure what this error is saying but i'm sure it has to do with my maven version.我不确定这个错误在说什么,但我确定它与我的 maven 版本有关。 I've installed maven on my mac using homebrew, but it is version 3.8.6.我已经使用自制软件在我的 Mac 上安装了 maven,但它是 3.8.6 版。 The "embedded maven installation" under preferences-AnypointStudio-maven in Anypoint says 3.6.3. Anypoint中的preferences-AnypointStudio-maven下的“嵌入式maven安装”说的是3.6.3。 Then the plugin version on my.pom file says 3.5.4.然后 my.pom 文件上的插件版本显示为 3.5.4。 Do i need to change any of these versions?我需要更改这些版本中的任何一个吗? Should i edit the one in the.pom file?我应该编辑.pom 文件中的那个吗? Should i downgrade my mac maven version?我应该降级我的mac maven 版本吗? Any help would be appreciated.任何帮助,将不胜感激。 I've posted a partial error and a partial.pom file.我发布了一个部分错误和一个 partial.pom 文件。 Please let me know if you need any more info to help me.如果您需要更多信息来帮助我,请告诉我。 Thank you谢谢

 > [ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.5.4:process-sources (default-process-sources) on project maven: Execution default-process-sources of goal org.mule.tools.maven:mule-maven-plugin:3.5.4:process-sources failed: An API incompatibility was encountered while executing org.mule.tools.maven:mule-maven-plugin:3.5.4:process-sources: java.lang.IllegalAccessError: class org.mule.maven.client.internal.util.FileUtils (in unnamed module @0x6d9fb2d1) cannot access class sun.net.www.protocol.jar.JarURLConnection (in module java.base) because module java.base does not export sun.net.www.protocol.jar to unnamed module @0x6d9fb2d1 [ERROR] ----------------------------------------------------- [ERROR] realm = extension>org.mule.tools.maven:mule-maven-plugin:3.5.4 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/Users/ammanbesaw/.m2/repository/org/mule/tools/maven/mule-maven-plugin/3.5.4/mule-maven-plugin-3.5.4.jar

Pom file Pom 文件

 > <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany</groupId> <artifactId>maven</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>mule-application</packaging> <name>maven</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <app.runtime>4.4.0-20220523</app.runtime> <mule.maven.plugin.version>3.5.4</mule.maven.plugin.version> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>3.0.0</version> </plugin> <plugin> <groupId>org.mule.tools.maven</groupId> <artifactId>mule-maven-plugin</artifactId> <version>3.5.4</version> <extensions>true</extensions>

The cause of the error seems to be that Maven is using a Java/JDK version that is not supported by Mule.错误的原因似乎是 Maven 使用了 Mule 不支持的 Java/JDK 版本。 Only Java/JDK versions 8 and 11 are supported.仅支持 Java/JDK 版本 8 和 11。 Ensure that Maven is executing a supported JDK version.确保 Maven 正在执行受支持的 JDK 版本。

While making a build for your project in any cloud environment.在任何云环境中为您的项目进行构建时。 Try to change image from linux/unix to window or window to other.尝试将图像从 linux/unix 更改为 window 或 window 到其他。 Operating system and image should be the same to successfully build.操作系统和映像应该相同才能成功构建。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM