Mulesoft-Cloudhub部署错误:部署配置无效,:未定义部署配置



这是我在POM:中的构建细节

<build>
<plugins>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>${mule.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<deploymentType>${deploymentType}</deploymentType>
<muleVersion>${muleVersion}</muleVersion>
<redeploy>${redeploy}</redeploy>
<businessGroup>${businessGroup}</businessGroup>
<username>${username}</username>
<password>${password}</password>
<applicationName>${applicationName}</applicationName>
<environment>${environment}</environment>
<region>${region}</region>
<workers>${workers}</workers>
<workerType>${workerType}</workerType>
<uri>${anypoint.uri}</uri>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<compilerArgs>
<args>-parameters</args>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>

这些是我的财产:

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<app.runtime>4.2.1</app.runtime>
<mule.maven.plugin.version>3.2.7</mule.maven.plugin.version>
<deploymentType>cloudhub</deploymentType>
<muleVersion>4.2.1</muleVersion>
<redeploy>true</redeploy>
<businessGroup>****</businessGroup>
<username>****</username>
<password>****</password>
<applicationName>****</applicationName>
<environment>Sandbox</environment>
<region>us-east-1</region>
<workers>1</workers>
<workerType>Micro</workerType>
<anypoint.uri>https://anypoint.mulesoft.com</anypoint.uri>
</properties>

以下是我的终端命令:

mvn干净部署-DmuleDeploy-X我得到以下错误:

[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.2.7:deploy (default-deploy) on project helloworld: Deployment configuration is not valid, : No deployment configuration was defined. Aborting. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.2.7:deploy (default-deploy) on project helloworld: Deployment configuration is not valid,

如果我使用以下配置,它将在cloudhub中成功部署:

<configuration>
<cloudHubDeployment>
<uri>${anypoint.uri}</uri>
<muleVersion>${muleVersion}</muleVersion>
<businessGroup>${businessGroup}</businessGroup>
<username>${username}</username>
<password>${password}</password>
<applicationName>${applicationName}</applicationName>
<environment>${environment}</environment>
<region>${region}</region>
<workers>${workers}</workers>
<workerType>${workerType}</workerType>
</cloudHubDeployment>
</configuration>

不确定我在第一个配置中哪里做错了。

第一个示例中的配置适用于Mule 3.x的旧版本Mule Maven插件(2.2.x或更早版本(。Mule 4.x(3.3.x(的版本始终使用第二个示例的格式。请参阅上的文档https://docs.mulesoft.com/mule-runtime/4.2/mmp-concept#deploying-到cloudhub

Mule 3的Mule Maven插件的最后一个版本(2.3.x(使用了与Mule 4版本相同的格式。

总之,第一个示例已经过时,与Mule 4部署不兼容。

最新更新