我正在尝试使用soapui-pro-maven-plugin 5.1.1来运行soapui测试套件并获取以下错误消息
mvn -DrestEndpointUrl=http://rest.test.endpoint:6543/ test
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.110 s
[INFO] Finished at: 2014-08-11T10:33:03+03:00
[INFO] Final Memory: 17M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.1:test (default) on project soapui-maven2-plugin: Execution default of goal com.
smartbear.soapui:soapui-pro-maven-plugin:5.1.1:test failed: A required class was missing while executing com.smartbear.soapui:soapui-pro-maven-plugin:5.1.1:test
: org/reflections/Configuration
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.smartbear.soapui:soapui-pro-maven-plugin:5.1.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/AA/.m2/repository/com/smartbear/soapui/soapui-pro-maven-plugin/5.1.1/soapui-pro-maven-plugin-5.1.1.jar
[ERROR] urls[1] = file:/C:/Users/AA/.m2/repository/com/smartbear/soapui/soapui/5.1.1/soapui-5.1.1.jar
[ERROR] urls[2] = file:/C:/Users/AA/.m2/repository/junit/junit/4.11/junit-4.11.jar
[ERROR] urls[3] = file:/C:/Users/AA/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[ERROR] urls[4] = file:/C:/Users/AA/.m2/repository/xmlbeans/xbean/fixed-2.4.0/xbean-fixed-2.4.0.jar
[ERROR] urls[5] = file:/C:/Users/AA/.m2/repository/xmlbeans/xbean_xpath/2.4.0/xbean_xpath-2.4.0.jar
[ERROR] urls[6] = file:/C:/Users/AA/.m2/repository/xmlbeans/xmlpublic/2.4.0/xmlpublic-2.4.0.jar
[ERROR] urls[7] = file:/C:/Users/AA/.m2/repository/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar
[ERROR] urls[8] = file:/C:/Users/AA/.m2/repository/com/google/guava/guava/14.0/guava-14.0.jar
[ERROR] urls[9] = file:/C:/Users/AA/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[10] = file:/C:/Users/AA/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
[ERROR] urls[11] = file:/C:/Users/AA/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
[ERROR] urls[12] = file:/C:/Users/AA/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar
[ERROR] urls[13] = file:/C:/Users/AA/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
[ERROR] urls[14] = file:/C:/Users/AA/.m2/repository/com/smartbear/utils/analytics/analytics-core/5.1.0/analytics-core-5.1.0.jar
[ERROR] urls[15] = file:/C:/Users/AA/.m2/repository/com/smartbear/utils/analytics/out-app-analytics-provider/5.1.0/out-app-analytics-provider-5.1.0.jar
[ERROR] urls[16] = file:/C:/Users/AA/.m2/repository/com/jgoodies/looks/2.2.0/looks-2.2.0.jar
[ERROR] urls[17] = file:/C:/Users/AA/.m2/repository/com/fifesoft/rsyntaxtextarea/2.5.0/rsyntaxtextarea-2.5.0.jar
[ERROR] urls[18] = file:/C:/Users/AA/.m2/repository/jetty/jetty/6.1.26/jetty-6.1.26.jar
[ERROR] urls[19] = file:/C:/Users/AA/.m2/repository/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar
[ERROR] urls[20] = file:/C:/Users/AA/.m2/repository/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar
[ERROR] urls[21] = file:/C:/Users/AA/.m2/repository/org/apache/ws/security/wss4j/1.6.14/wss4j-1.6.14.jar
[ERROR] urls[22] = file:/C:/Users/AA/.m2/repository/org/opensaml/opensaml/2.5.1-1/opensaml-2.5.1-1.jar
[ERROR] urls[23] = file:/C:/Users/AA/.m2/repository/org/opensaml/openws/1.4.2-1/openws-1.4.2-1.jar
[ERROR] urls[24] = file:/C:/Users/AA/.m2/repository/org/opensaml/xmltooling/1.3.2-1/xmltooling-1.3.2-1.jar
[ERROR] urls[25] = file:/C:/Users/AA/.m2/repository/joda-time/joda-time/1.6.2/joda-time-1.6.2.jar
[ERROR] urls[26] = file:/C:/Users/AA/.m2/repository/net/sourceforge/htmlunit/htmlunit/2.7/htmlunit-2.7.jar
[ERROR] urls[27] = file:/C:/Users/AA/.m2/repository/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
[ERROR] urls[28] = file:/C:/Users/AA/.m2/repository/org/w3c/css/sac/1.3/sac-1.3.jar
[ERROR] urls[29] = file:/C:/Users/AA/.m2/repository/net/sourceforge/htmlunit/htmlunit-core-js/2.7/htmlunit-core-js-2.7.jar
[ERROR] urls[30] = file:/C:/Users/AA/.m2/repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar
[ERROR] urls[31] = file:/C:/Users/AA/.m2/repository/org/apache/httpcomponents/httpmime/4.1.1/httpmime-4.1.1.jar
[ERROR] urls[32] = file:/C:/Users/AA/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.1.1/httpclient-cache-4.1.1.jar
[ERROR] urls[33] = file:/C:/Users/AA/.m2/repository/org/apache/httpcomponents/httpcore/4.1.1/httpcore-4.1.1.jar
[ERROR] urls[34] = file:/C:/Users/AA/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.1.1/httpcore-nio-4.1.1.jar
[ERROR] urls[35] = file:/C:/Users/AA/.m2/repository/org/apache/oltu/oauth2/org.apache.oltu.oauth2.client/0.31/org.apache.oltu.oauth2.client-0.31.jar
[ERROR] urls[36] = file:/C:/Users/AA/.m2/repository/org/apache/oltu/oauth2/org.apache.oltu.oauth2.common/0.31/org.apache.oltu.oauth2.common-0.31.jar
[ERROR] urls[37] = file:/C:/Users/AA/.m2/repository/org/codehaus/jettison/jettison/1.2/jettison-1.2.jar
[ERROR] urls[38] = file:/C:/Users/AA/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar
[ERROR] urls[39] = file:/C:/Users/AA/.m2/repository/org/apache/oltu/oauth2/org.apache.oltu.oauth2.httpclient4/0.31/org.apache.oltu.oauth2.httpclient4-0.31.jar
[ERROR] urls[40] = file:/C:/Users/AA/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar
[ERROR] urls[41] = file:/C:/Users/AA/.m2/repository/javax/mail/mail/1.4/mail-1.4.jar
[ERROR] urls[42] = file:/C:/Users/AA/.m2/repository/wsdl4j/wsdl4j/1.6.2-fixed/wsdl4j-1.6.2-fixed.jar
[ERROR] urls[43] = file:/C:/Users/AA/.m2/repository/commons-ssl/not-yet-commons-ssl/0.3.11/not-yet-commons-ssl-0.3.11.jar
[ERROR] urls[44] = file:/C:/Users/AA/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[45] = file:/C:/Users/AA/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
[ERROR] urls[46] = file:/C:/Users/AA/.m2/repository/json/json-lib/2.2.2-jdk15/json-lib-2.2.2-jdk15.jar
[ERROR] urls[47] = file:/C:/Users/AA/.m2/repository/ezmorph/ezmorph/1.0.5/ezmorph-1.0.5.jar
[ERROR] urls[48] = file:/C:/Users/AA/.m2/repository/xom/xom/1.1/xom-1.1.jar
[ERROR] urls[49] = file:/C:/Users/AA/.m2/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar
[ERROR] urls[50] = file:/C:/Users/AA/.m2/repository/jaxen/jaxen/1.1-beta-8/jaxen-1.1-beta-8.jar
[ERROR] urls[51] = file:/C:/Users/AA/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
[ERROR] urls[52] = file:/C:/Users/AA/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar
[ERROR] urls[53] = file:/C:/Users/AA/.m2/repository/swingx/swingx/soapui/swingx-soapui.jar
[ERROR] urls[54] = file:/C:/Users/AA/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
[ERROR] urls[55] = file:/C:/Users/AA/.m2/repository/org/codehaus/groovy/groovy-all/2.1.7/groovy-all-2.1.7.jar
[ERROR] urls[56] = file:/C:/Users/AA/.m2/repository/rhino/js/1.7R2/js-1.7R2.jar
[ERROR] urls[57] = file:/C:/Users/AA/.m2/repository/saxon/saxon/9.1.0.8j/saxon-9.1.0.8j.jar
[ERROR] urls[58] = file:/C:/Users/AA/.m2/repository/saxon/saxon-dom/9.1.0.8j/saxon-dom-9.1.0.8j.jar
[ERROR] urls[59] = file:/C:/Users/AA/.m2/repository/xmlunit/xmlunit/1.2/xmlunit-1.2.jar
[ERROR] urls[60] = file:/C:/Users/AA/.m2/repository/xalan/xalan/2.7.1/xalan-2.7.1.jar
[ERROR] urls[61] = file:/C:/Users/AA/.m2/repository/bouncycastle/bcprov-jdk15/144/bcprov-jdk15-144.jar
[ERROR] urls[62] = file:/C:/Users/AA/.m2/repository/jtidy/jtidy/r872-jdk15/jtidy-r872-jdk15.jar
[ERROR] urls[63] = file:/C:/Users/AA/.m2/repository/javax/jms/jms/1.1/jms-1.1.jar
[ERROR] urls[64] = file:/C:/Users/AA/.m2/repository/hermesjms/hermes/1.14/hermes-1.14.jar
[ERROR] urls[65] = file:/C:/Users/AA/.m2/repository/amf/flex-messaging-common/1.0/flex-messaging-common-1.0.jar
[ERROR] urls[66] = file:/C:/Users/AA/.m2/repository/amf/flex-messaging-core/1.0/flex-messaging-core-1.0.jar
[ERROR] urls[67] = file:/C:/Users/AA/.m2/repository/amf/flex-messaging-opt/1.0/flex-messaging-opt-1.0.jar
[ERROR] urls[68] = file:/C:/Users/AA/.m2/repository/amf/flex-messaging-proxy/1.0/flex-messaging-proxy-1.0.jar
[ERROR] urls[69] = file:/C:/Users/AA/.m2/repository/amf/flex-messaging-remoting/1.0/flex-messaging-remoting-1.0.jar
[ERROR] urls[70] = file:/C:/Users/AA/.m2/repository/thoughtworks/xstream/1.3.1/xstream-1.3.1.jar
[ERROR] urls[71] = file:/C:/Users/AA/.m2/repository/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5.jar
[ERROR] urls[72] = file:/C:/Users/AA/.m2/repository/net/sourceforge/nekohtml/nekohtml/1.9.14/nekohtml-1.9.14.jar
[ERROR] urls[73] = file:/C:/Users/AA/.m2/repository/org/samba/jcifs/jcifs/1.2.9/jcifs-1.2.9.jar
[ERROR] urls[74] = file:/C:/Users/AA/.m2/repository/l2fprod/l2fprod-common-directorychooser/7.3/l2fprod-common-directorychooser-7.3.jar
[ERROR] urls[75] = file:/C:/Users/AA/.m2/repository/l2fprod/l2fprod-common-fontchooser/7.3/l2fprod-common-fontchooser-7.3.jar
[ERROR] urls[76] = file:/C:/Users/AA/.m2/repository/org/apache/santuario/xmlsec/1.4.5/xmlsec-1.4.5.jar
[ERROR] urls[77] = file:/C:/Users/AA/.m2/repository/org/apache/xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar
[ERROR] urls[78] = file:/C:/Users/AA/.m2/repository/xalan/serializer/2.7.1/serializer-2.7.1.jar
[ERROR] urls[79] = file:/C:/Users/AA/.m2/repository/gnu/cajo/cajo/1.142/cajo-1.142.jar
[ERROR] urls[80] = file:/C:/Users/AA/.m2/repository/org/apache/ws/commons/util/ws-commons-util/1.0.2/ws-commons-util-1.0.2.jar
[ERROR] urls[81] = file:/C:/Users/AA/.m2/repository/com/btr/proxy-vole/20131209/proxy-vole-20131209.jar
[ERROR] urls[82] = file:/C:/Users/AA/.m2/repository/com/jayway/jsonpath/json-path/0.9.1/json-path-0.9.1.jar
[ERROR] urls[83] = file:/C:/Users/AA/.m2/repository/net/minidev/json-smart/1.2/json-smart-1.2.jar
[ERROR] urls[84] = file:/C:/Users/AA/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar
[ERROR] urls[85] = file:/c:/jdk1.7.0_67/jre/lib/jfxrt.jar
[ERROR] urls[86] = file:/C:/Users/AA/.m2/repository/com/smartbear/soapui/soapui-pro/5.1.1/soapui-pro-5.1.1.jar
[ERROR] urls[87] = file:/C:/Users/AA/.m2/repository/opencsv/opencsv/1.8/opencsv-1.8.jar
[ERROR] urls[88] = file:/C:/Users/AA/.m2/repository/jasperreports/jasperreports/4.0.2/jasperreports-4.0.2.jar
[ERROR] urls[89] = file:/C:/Users/AA/.m2/repository/commons-digester/commons-digester/1.7/commons-digester-1.7.jar
[ERROR] urls[90] = file:/C:/Users/AA/.m2/repository/com/lowagie/itext/2.1.7/itext-2.1.7.jar
[ERROR] urls[91] = file:/C:/Users/AA/.m2/repository/bouncycastle/bcmail-jdk14/138/bcmail-jdk14-138.jar
[ERROR] urls[92] = file:/C:/Users/AA/.m2/repository/bouncycastle/bcprov-jdk14/138/bcprov-jdk14-138.jar
[ERROR] urls[93] = file:/C:/Users/AA/.m2/repository/org/bouncycastle/bctsp-jdk14/1.38/bctsp-jdk14-1.38.jar
[ERROR] urls[94] = file:/C:/Users/AA/.m2/repository/org/bouncycastle/bcprov-jdk14/1.38/bcprov-jdk14-1.38.jar
[ERROR] urls[95] = file:/C:/Users/AA/.m2/repository/org/bouncycastle/bcmail-jdk14/1.38/bcmail-jdk14-1.38.jar
[ERROR] urls[96] = file:/C:/Users/AA/.m2/repository/jfree/jcommon/1.0.15/jcommon-1.0.15.jar
[ERROR] urls[97] = file:/C:/Users/AA/.m2/repository/jfree/jfreechart/1.0.12/jfreechart-1.0.12.jar
[ERROR] urls[98] = file:/C:/Users/AA/.m2/repository/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar
[ERROR] urls[99] = file:/C:/Users/AA/.m2/repository/eclipse/jdtcore/3.1.0/jdtcore-3.1.0.jar
[ERROR] urls[100] = file:/C:/Users/AA/.m2/repository/net-components/netcomponents/1.3.8a/netcomponents-1.3.8a.jar
[ERROR] urls[101] = file:/C:/Users/AA/.m2/repository/idw/idw/1.6.1/idw-1.6.1.jar
[ERROR] urls[102] = file:/C:/Users/AA/.m2/repository/net/sourceforge/jexcelapi/jxl/2.6.12/jxl-2.6.12.jar
[ERROR] urls[103] = file:/C:/Users/AA/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.reflections.Configuration
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
我的pom.xml:
<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.smartbear.samples</groupId>
<artifactId>soapui-maven2-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven 2 SoapUI Sample</name>
<url>http://maven.apache.org</url>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<restEndpointUrl>http://default.host:1234</restEndpointUrl>
<socialEndpointUrl>http://default.host:2345</socialEndpointUrl>
<soapuiProjectFile>default-soapui-project.xml</soapuiProjectFile>
<soapuiPropertiesFile>Global.properties</soapuiPropertiesFile>
<serviceBasePath>default</serviceBasePath>
<testUser>default</testUser>
<testPass>default</testPass>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.1.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>${soapuiProjectFile}</projectFile>
<junitReport>true</junitReport>
<outputFolder>./report</outputFolder>
<printReport>true</printReport>
<globalProperties>
<value>EnvironmentProperties=${soapuiPropertiesFile}</value>
<value>EndpointUrl=${restEndpointUrl}</value>
<value>SocialEndpointUrl=${socialEndpointUrl}</value>
<value>user=${testUser}</value>
<value>pass=${testPass}</value>
<value>ServiceBasePath=${serviceBasePath}</value>
</globalProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>.</directory>
<includes>
<include>**/*.log</include>
</includes>
</fileset>
<fileset>
<directory>./report</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>
一些观察结果:
问题: 如何添加所需的类和相关的依赖项,以便soapui-pro-maven-plugin 5.1.1有效?
maven和java版本:
mvn -version
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T16:51:42+03:00)
Maven home: c:\Program Files\Apache Software Foundation\apache-maven-3.2.2
Java version: 1.7.0_67, vendor: Oracle Corporation
Java home: c:\jdk1.7.0_67\jre
Default locale: en_US, platform encoding: Cp1251
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
答案 0 :(得分:2)
在这里找到答案
http://forum.soapui.org/viewtopic.php?f=13&t=24929
通过在插件配置中添加依赖部分来修复 修正了下面的pom.xml
<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.smartbear.samples</groupId>
<artifactId>soapui-maven2-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven 2 SoapUI Sample</name>
<url>http://maven.apache.org</url>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<restEndpointUrl>http://default.host:1234</restEndpointUrl>
<socialEndpointUrl>http://default.host:2345</socialEndpointUrl>
<soapuiProjectFile>default-soapui-project.xml</soapuiProjectFile>
<soapuiPropertiesFile>Global.properties</soapuiPropertiesFile>
<serviceBasePath>default</serviceBasePath>
<testUser>default</testUser>
<testPass>default</testPass>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.1.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>${soapuiProjectFile}</projectFile>
<junitReport>true</junitReport>
<outputFolder>./report</outputFolder>
<printReport>true</printReport>
<globalProperties>
<value>EnvironmentProperties=${soapuiPropertiesFile}</value>
<value>EndpointUrl=${restEndpointUrl}</value>
<value>SocialEndpointUrl=${socialEndpointUrl}</value>
<value>user=${testUser}</value>
<value>pass=${testPass}</value>
<value>ServiceBasePath=${serviceBasePath}</value>
</globalProperties>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections-maven</artifactId>
<version>0.9.9-RC2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>.</directory>
<includes>
<include>**/*.log</include>
</includes>
</fileset>
<fileset>
<directory>./report</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>