无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

时间:2014-09-15 11:49:10

标签: xml maven dependencies integration-testing wso2esb

我正在开发一个WSO2 ESB连接器。当我使用testng框架测试时,我收到了以下错误。

运行TestSuite     [2014-09-15 17:06:14,571] INFO {org.wso2.carbon.automation.core.PlatformExecutionManager} - ---------------测试执行开始----- ---------------------     [2014-09-15 17:06:14,574] INFO {org.wso2.carbon.automation.core.PlatformExecutionManager} - 将服务上传到App Server ...     [2014-09-15 17:06:14,577] INFO {org.wso2.carbon.automation.core.UserPopulator} - 填充用户....     [2014-09-15 17:06:14,580] ERROR {org.wso2.carbon.automation.core.utils.UserListCsvReader} - 找不到用户列表java.io.FileNotFoundException:/ home / dinithi / Desktop / toodledo [final] / ToodleDo / src / test / resources / userList.csv(没有这样的文件或目录)     [2014-09-15 17:06:14,580] ERROR {org.wso2.carbon.automation.core.utils.UserListCsvReader} - 找不到配置文件     org.apache.maven.surefire.util.SurefireReflectionException:java.lang.reflect.InvocationTargetException;嵌套异常是java.lang.reflect.InvocationTargetException:null     java.lang.reflect.InvocationTargetException             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)             在java.lang.reflect.Method.invoke(Method.java:597)             at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)             在org.apache.maven.surefire.booter.ProviderFactory $ ProviderProxy.invoke(ProviderFactory.java:165)             在org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)             在org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)             在org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)     引起:java.lang.ExceptionInInitializerError             在org.wso2.carbon.automation.core.UserPopulator.populateUsers(UserPopulator.java:75)             在org.wso2.carbon.automation.core.PlatformExecutionManager.onExecutionStart(PlatformExecutionManager.java:82)             在org.testng.TestNG.runExecutionListeners(TestNG.java:1032)             在org.testng.TestNG.run(TestNG.java:983)             在org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)             在org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)             在org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)             ......还有9个     引起:java.lang.NullPointerException             在org.wso2.carbon.automation.core.utils.UserListCsvReader.csvUserReader(UserListCsvReader.java:111)             在org.wso2.carbon.automation.core.utils.UserListCsvReader。(UserListCsvReader.java:56)             ......还有16个

可能是什么错误?以及如何解决它?

提前谢谢。

我的pom.xml如下所示。

<?xml version="1.0" encoding="UTF-8"?>
<!--suppress ALL -->
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.wso2.esb.connector</groupId>
    <artifactId>com.wso2.esb.connector</artifactId>
    <version>1.0.0</version>
    <packaging>bundle</packaging>
    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.mediation.initializer</artifactId>
            <version>4.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.connector.core</artifactId>
            <version>4.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.synapse</groupId>
            <artifactId>synapse-core</artifactId>
            <version>2.1.2-wso2v4</version>
        </dependency>

        <!-- test automation dependancies -->
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.engine</artifactId>
            <version>${automation.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.core</artifactId>
            <version>${test.framework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.test.utils</artifactId>
            <version>${automation.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.extensions</artifactId>
            <version>${automation.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.integration.common.extensions</artifactId>
            <version>${common.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.integration.common.admin.client</artifactId>
            <version>${common.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.mediation.library.stub</artifactId>
            <version>${stub.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.proxyadmin.stub</artifactId>
            <version>${proxyadmin.stub.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.mediation.initializer</artifactId>
            <version>${stub.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.synapse</groupId>
            <artifactId>synapse-core</artifactId>
            <version>${synapse.core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.mediation.configadmin.stub</artifactId>
            <version>${stub.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.mediation.library.stub</artifactId>
            <version>${carbon.platform.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.integration.framework</artifactId>
            <version>4.0.0</version>
        </dependency>

        <!-- <dependency>
            <groupId>org.wso2.esb</groupId>
            <artifactId>service-samples</artifactId>
            <version>4.8.1</version>
        </dependency> -->
        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.api</artifactId>
            <version>${test.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.core</artifactId>
            <version>${test.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.utils</artifactId>
            <version>${test.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.1-rc-1</version>
        </dependency>
        <dependency>
            <groupId>org.jruby</groupId>
            <artifactId>jruby-complete</artifactId>
            <version>1.3.0</version>
        </dependency>
        <!--dependency>
            <groupId>emma</groupId>
            <artifactId>emma</artifactId>
            <version>${emma.version}</version>
        </dependency-->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>SecVerifier</artifactId>
            <version>${carbon.platform.version}</version>
            <type>aar</type>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
            <version>5.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
            <version>1.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jms_1.1_spec</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi.wso2</groupId>
            <artifactId>hapi</artifactId>
            <version>2.1.0.wso2v1</version>
        </dependency>
        <!--dependency>
            <groupId>org.wso2.esb</groupId>
            <artifactId>org.wso2.carbon.esb.tests.ui</artifactId>
            <version>4.8.1-SNAPSHOT</version>
        </dependency-->
        <dependency>
            <groupId>org.wso2.esb</groupId>
            <artifactId>org.wso2.carbon.esb.common</artifactId>
            <version>4.8.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>1.2.3</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
    <properties>
        <automation.framework.version>4.3.1-SNAPSHOT</automation.framework.version>
        <stub.version>4.2.0</stub.version>
        <synapse.core.version>2.1.1-wso2v7</synapse.core.version>
        <common.version>4.3.0-SNAPSHOT</common.version>
        <proxyadmin.stub.version>4.2.1</proxyadmin.stub.version>
        <test.framework.version>${carbon.platform.version}</test.framework.version>
        <carbon.platform.version>4.2.0</carbon.platform.version>
        <esb.version>4.8.1</esb.version>
    </properties>

</project>

项目地点:https://github.com/dinithiviranga/Toodledo

1 个答案:

答案 0 :(得分:0)

检查包裹名称。希望您根据项目https://github.com/dinithiviranga/Toodledo

解决问题