【问题标题】:Mulesoft - Cloudhub deployment error: Deployment configuration is not valid, : No deployment configuration was definedMulesoft - Cloudhub 部署错误:部署配置无效,:未定义部署配置
【发布时间】:2019-11-21 05:36:04
【问题描述】:

这是我在 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 clean deploy -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>

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

【问题讨论】:

    标签: deployment mulesoft cloudhub


    【解决方案1】:

    第一个示例中的配置适用于 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-to-cloudhub的文档

    Mule 3 (2.3.x) uses the same format than the Mule 4 version 的 Mule Maven 插件的最新版本。

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

    【讨论】:

    • 因此,如果某人有一个组织并且正在使用https://maven.anypoint.mulesoft.com/api/v1/organizations/${project.groupId}/maven,但在部署时获得了一个错误 405 方法,这意味着什么?即不支持请求方法“POST”
    • 我不确定为什么有人会使用带有 Exchange Maven URL 的 CloudHub 部署配置。这些是完全不同的事情。如果您想了解更多详细信息,请发布一个新问题,因为它与此处提出的主题不同。
    猜你喜欢
    • 1970-01-01
    • 2017-07-28
    • 1970-01-01
    • 2011-03-28
    • 1970-01-01
    • 1970-01-01
    • 2020-11-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多