org.mule.module.client.MuleClient未发现编译错误

org.mule.module.client.MuleClient not found compile error

我有一个生成以下编译错误的 Mule 项目:

    -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /G:/git/edx-client-service/edx_client/src/test/java/test/RestTestBase.java:[21,30] package org.mule.module.client does not exist
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.633 s
[INFO] Finished at: 2015-09-18T15:23:08-06:00
[INFO] Final Memory: 37M/88M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:testCompile (default-testCompile) on project edx_client: Compilation failure
[ERROR] /G:/git/edx-client-service/edx_client/src/test/java/test/RestTestBase.java:[21,30] package org.mule.module.client does not exist

我试图在我的 pom.xml 文件中排除测试包以解决此问题:

           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/src/test/*</exclude>
                    </excludes>
                </configuration>
            </plugin>

这不起作用。我用谷歌搜索任何想法都无济于事。有什么想法我需要做什么或接下来要看什么吗?

您的 Maven 依赖项似乎没有 "org.mule.module.client"。

<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-module-client</artifactId>
    <version>${mule.version}</version>
    <scope>provided</scope>
</dependency>

您需要将该依赖项添加到您的项目中,但您可能还需要其他 Mule 依赖项,因此一个好的解决方案是添加具有测试范围的分发依赖项(这样它就不会包含在您的打包的应用程序): org.mule.distributions: mule-standalone:3.7.0:tar.gz

尝试从您的 POM 文件中排除依赖项,然后从此处下载所需的 JAR 文件 http://mvnrepository.com/artifact/org.mule/mule-core/3.7.0。不要忘记将其添加到您的构建路径中。