Mule Maven 插件 3.8.0 未按预期工作

问题描述 投票:0回答:2

当我使用 mule-maven-plugin 版本时

3.5.4
我能够在 Anypoint Studio 中成功构建和运行项目,但是对于同一个项目,当我将 mule-maven-plugin 版本更新到
3.8.0
时,它会被提升一个错误,
${error.customerror.type}
在引发错误组件以及错误传播组件中动态使用,该组件与 mule-maven 3.5.4 配合良好,但不适用于 3.8.0

未能执行目标 org.mule.tools.maven:mule-maven-plugin:3.8.0:进程类 项目 dna-db-system-api-v1 上的(默认进程类):失败 编译:没有名为“${ERROR.CUSTOMERROR.TYPE}”的 MULE 错误

根据发行说明3.8.03.5.4我已在我的电脑和项目中配置了所有提到的要求。

pom.xml

    <name>dna-db-system-api</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <app.runtime>4.4.0-20230217</app.runtime>
        <mule.maven.plugin.version>3.8.0</mule.maven.plugin.version>
        <munit.version>2.3.12</munit.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.mule.tools.maven</groupId>
                <artifactId>mule-maven-plugin</artifactId>
                <version>${mule.maven.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <sharedLibraries>
                        <sharedLibrary>
                            <groupId>com.oracle.ojdbc</groupId>
                            <artifactId>ojdbc8</artifactId>
                        </sharedLibrary>
                    </sharedLibraries>
                    <cloudHubDeployment>
                        <uri>https://anypoint.mulesoft.com</uri>
                        <muleVersion>${MULE_VERSION}</muleVersion>
                        <connectedAppClientId>${connectedAppClientID}</connectedAppClientId>
                        <connectedAppClientSecret>${connectedAppClientSecret}</connectedAppClientSecret>
                        <connectedAppGrantType>client_credentials</connectedAppGrantType>
                        <applicationName>${MULE_APP_NAME}</applicationName>
                        <region>${MULE_REGION}</region>
                        <workers>${MULE_WORKER}</workers>
                        <workerType>${MULE_WORKER_TYP}</workerType>
                        <environment>${ANYPOINT_ENVIRONMENT}</environment>
                        <objectStoreV2>true</objectStoreV2>
                        <businessGroupId>${project.groupId}</businessGroupId>
                        <properties>
                            <MULE_ENV>${MULE_ENV}</MULE_ENV>
                            <MULE_KEY>${MULE_KEY}</MULE_KEY>
                            <anypoint.platform.config.analytics.agent.enabled>true</anypoint.platform.config.analytics.agent.enabled>
                            <anypoint.platform.client_id>${ANYPOINT_CLIENT_ID}</anypoint.platform.client_id>
                            <anypoint.platform.client_secret>${ANYPOINT_CLIENT_SECRET}</anypoint.platform.client_secret>
                        </properties>
                    </cloudHubDeployment>
                    <classifier>mule-application</classifier>
                </configuration>
            </plugin>
        </plugins>
    </build>

这里我在anypoint studio中使用内置的嵌入式maven配置

这是我电脑的java版本和maven版本

环境变量中java和maven按照要求正确配置。我想知道安装中是否存在冲突或缺少某些内容或配置错误。请大家给点建议

maven mule mulesoft mule4
2个回答
1
投票

该错误表明构建不喜欢使用属性占位符而不是文字定义的错误。这可能是一个新的验证,也可能是一个错误。它与依赖关系没有任何关系。尝试使用最新版本的 Mule Maven 插件,看看是否有效。如果不向 MuleSoft 打开支持案例来报告问题。


0
投票

我将 pom.xml 中的 mule maven 插件版本从 3.8.2 更新到 4.0.0 并且它开始工作

4.0.0

© www.soinside.com 2019 - 2024. All rights reserved.