我遇到了运行Junit4测试的问题.在 https://stackoverflow.com/questions/2021771?sort=newest#sort-top中报告了同样的问题,但解决方案是去除了违规依赖,其传递依赖性导致包含junit3.在我的情况下,依赖是必要的.我试图弄清楚如何将传递依赖性排除在junit3之外,因此它不包含在surefire:test classpath中.

下面是我的pom.xml和“mvn -X test”的输出. pom.xml尝试使用“排除”元素,但这似乎没有帮助.注意底部附近maven将junit3添加到测试类路径.

<?xml version="1.0"?>
<project>
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.comcast.service</groupId>
 <artifactId>LocationServiceIntTest</artifactId>
 <version>10.01</version>
 <packaging>jar</packaging>
 <name>Location Service Integration Test</name>
 <repositories>
  <repository>
   <id>central</id>
   <url>http://pacdcntdp01.cable.comcast.com:8081/artifactory/repo</url>
   <snapshots>
    <enabled>false</enabled>
   </snapshots>
  </repository>
  <repository>
   <id>3rdp-releases</id>
   <url>http://pacdcntdp01.cable.comcast.com:8081/artifactory/3rdp-releases
   </url>
   <snapshots>
    <enabled>false</enabled>
   </snapshots>
  </repository>
  <repository>
   <id>snapshots</id>
   <url>http://pacdcntdp01.cable.comcast.com:8081/artifactory/repo</url>
   <releases>
    <enabled>true</enabled>
   </releases>
  </repository>
 </repositories>
 <pluginRepositories>
  <pluginRepository>
   <id>central</id>
   <url>http://pacdcntdp01.cable.comcast.com:8081/artifactory/repo</url>
   <snapshots>
    <enabled>false</enabled>
   </snapshots>
  </pluginRepository>
  <pluginRepository>
   <id>snapshots</id>
   <url>http://pacdcntdp01.cable.comcast.com:8081/artifactory/repo</url>
   <releases>
    <enabled>false</enabled>
   </releases>
  </pluginRepository>
 </pluginRepositories>
 <build>
  <plugins>
   <plugin>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
    <version>1.5.1</version>
    <executions>
     <execution>
      <goals>
       <goal>wsdl2code</goal>
      </goals>
     </execution>
    </executions>
    <configuration>
     <packageName>com.comcast.service</packageName>
     <wsdlFile>${basedir}/../ServiceClient/src/main/resources/LocationService.wsdl
     </wsdlFile>
     <databindingName>adb</databindingName>
     <unpackClasses>true</unpackClasses>
    </configuration>
   </plugin>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
     <source>1.5</source>
     <target>1.5</target>
    </configuration>
   </plugin>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.4.3</version>
    <configuration>
     <includes>
      <include>**/*Test.java</include>
     </includes>
     <junitArtifactName>junit:junit:jar:4.4</junitArtifactName>
    </configuration>
   </plugin>
  </plugins>
 </build>
 <dependencyManagement>
  <dependencies>
   <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.4</version>
   </dependency>
  </dependencies>
 </dependencyManagement>
 <dependencies>
  <dependency>
   <groupId>org.unitils</groupId>
   <artifactId>unitils-core</artifactId>
   <version>3.1</version>
   <type>pom</type>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.unitils</groupId>
   <artifactId>unitils-testng</artifactId>
   <version>3.1</version>
   <type>pom</type>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.apache.axis2</groupId>
   <artifactId>axis2</artifactId>
   <version>1.5.1</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.apache.ws.commons.axiom</groupId>
   <artifactId>axiom-impl</artifactId>
   <version>1.2.8</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.apache.ws.commons.axiom</groupId>
   <artifactId>axiom-dom</artifactId>
   <version>1.2.8</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>axis</groupId>
   <artifactId>axis-wsdl4j</artifactId>
   <version>1.5.1</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.apache.rampart</groupId>
   <artifactId>rampart-core</artifactId>
   <version>1.4</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.apache.rampart</groupId>
   <artifactId>rampart</artifactId>
   <version>1.4</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.apache.rampart</groupId>
   <artifactId>rahas</artifactId>
   <version>1.4</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>org.apache.geronimo.specs</groupId>
   <artifactId>geronimo-jaxws_2.1_spec</artifactId>
   <version>1.0</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>commons-lang</groupId>
   <artifactId>commons-lang</artifactId>
   <version>2.4</version>
   <exclusions>
    <exclusion>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
 </dependencies>
 <reporting>
  <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.4</version>
   </plugin>
  </plugins>
 </reporting>
</project>
+ Error stacktraces are turned on.
Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600)
Java version: 1.5.0_22
Java home: c:\Program Files\Java\jdk1.5.0_22\jre
Default locale: en_US,platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\swall2633c\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'c:\opt\apache-maven-2.2.1-bin\apache-maven-2.2.1\conf\plugin-registry.xml'
[INFO] Scanning for projects...

 ..... intentionally excluded minimizing size of post ......



[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test' -->
[DEBUG]   (f) basedir = c:\dev\LocationService\IntegrationTest
[DEBUG]   (f) childDelegation = false
[DEBUG]   (f) classesDirectory = c:\dev\LocationService\IntegrationTest\target\classes
[DEBUG]   (f) classpathelements = [c:\dev\LocationService\IntegrationTest\target\test-classes,c:\dev\LocationService\IntegrationTest\target\classes,C:\Documents and Settings\swall2633c\.m2\repository\junit\junit\4.4\junit-4.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-logging\commons-logging\1.1\commons-logging-1.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-collections\commons-collections\3.2\commons-collections-3.2.jar,C:\Documents and Settings\swall2633c\.m2\repository\ognl\ognl\2.6.9\ognl-2.6.9.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\unitils\unitils-core\3.1\unitils-core-3.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\testng\testng\5.8\testng-5.8-jdk15.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2\1.5.1\axis2-1.5.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.8\axiom-impl-1.2.8.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.8\axiom-api-1.2.8.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.0.1\geronimo-activation_1.1_spec-1.0.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.2\geronimo-javamail_1.4_spec-1.2.jar,C:\Documents and Settings\swall2633c\.m2\repository\jaxen\jaxen\1.1.1\jaxen-1.1.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar,C:\Documents and Settings\swall2633c\.m2\repository\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\codehaus\woodstox\wstx-asl\3.2.4\wstx-asl-3.2.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.8\axiom-dom-1.2.8.jar,C:\Documents and Settings\swall2633c\.m2\repository\axis\axis-wsdl4j\1.5.1\axis-wsdl4j-1.5.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\rampart\rampart-core\1.4\rampart-core-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\rampart\rampart-policy\1.4\rampart-policy-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2-kernel\1.4\axis2-kernel-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-fileupload\commons-fileupload\1.2\commons-fileupload-1.2.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\httpcomponents\httpcore\4.0-beta1\httpcore-4.0-beta1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.0-beta1\httpcore-nio-4.0-beta1.jar,C:\Documents and Settings\swall2633c\.m2\repository\wsdl4j\wsdl4j\1.6.2\wsdl4j-1.6.2.jar,C:\Documents and Settings\swall2633c\.m2\repository\backport-util-concurrent\backport-util-concurrent\3.1\backport-util-concurrent-3.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\commons\schema\XmlSchema\1.4.2\XmlSchema-1.4.2.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\neethi\neethi\2.0.4\neethi-2.0.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\woden\woden-api\1.0M8\woden-api-1.0M8.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\xerces\xmlParserAPIs\2.6.0\xmlParserAPIs-2.6.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\woden\woden-impl-dom\1.0M8\woden-impl-dom-1.0M8.jar,C:\Documents and Settings\swall2633c\.m2\repository\annogen\annogen\0.1.0\annogen-0.1.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-jms_1.1_spec\1.1\geronimo-jms_1.1_spec-1.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\javax\mail\mail\1.4\mail-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\xalan\xalan\2.7.0\xalan-2.7.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2-codegen\1.4\axis2-codegen-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2-adb\1.4\axis2-adb-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2-xmlbeans\1.4\axis2-xmlbeans-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\xmlbeans\xmlbeans\2.3.0\xmlbeans-2.3.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2-adb-codegen\1.4\axis2-adb-codegen-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\mex\1.4\mex-1.4-impl.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2-mtompolicy\1.4\axis2-mtompolicy-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\commons-discovery\commons-discovery\0.2\commons-discovery-0.2.jar,C:\Documents and Settings\swall2633c\.m2\repository\log4j\log4j\1.2.15\log4j-1.2.15.jar,C:\Documents and Settings\swall2633c\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\xmlbeans\xbean\2.1.0\xbean-2.1.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\security\wss4j\1.5.4\wss4j-1.5.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\santuario\xmlsec\1.4.1\xmlsec-1.4.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\opensaml\opensaml\1.1\opensaml-1.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis\axis-ant\1.4\axis-ant-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\bouncycastle\bcprov-jdk15\132\bcprov-jdk15-132.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ant\ant-nodeps\1.7.0\ant-nodeps-1.7.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\rampart\rampart-trust\1.4\rampart-trust-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\jdom\jdom\1.0\jdom-1.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\xom\xom\1.0\xom-1.0.jar,C:\Documents and Settings\swall2633c\.m2\repository\com\ibm\icu\icu4j\2.6.1\icu4j-2.6.1.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\rampart\rampart\1.4\rampart-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\rampart\rahas\1.4\rahas-1.4.jar,C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-jaxws_2.1_spec\1.0\geronimo-jaxws_2.1_spec-1.0.jar]
[DEBUG]   (f) disableXmlReport = false
[DEBUG]   (f) enableAssertions = true
[DEBUG]   (f) forkMode = once
[DEBUG]   (f) includes = [**/*Test.java]
[DEBUG]   (f) junitArtifactName = junit:junit
[DEBUG]   (f) localRepository = Repository[local|file://C:\Documents and Settings\swall2633c\.m2\repository]
[DEBUG]   (f) pluginArtifactMap = {org.apache.maven.surefire:surefire-booter=org.apache.maven.surefire:surefire-booter:jar:2.4.3:runtime,org.apache.maven.surefire:surefire-api=org.apache.maven.surefire:surefire-api:jar:2.4.3:runtime,org.codehaus.plexus:plexus-utils=org.codehaus.plexus:plexus-utils:jar:1.5.1:runtime,org.apache.maven:maven-plugin-api=org.apache.maven:maven-plugin-api:jar:2.0.6:runtime,org.apache.maven:maven-artifact=org.apache.maven:maven-artifact:jar:2.0.6:runtime,org.apache.maven:maven-project=org.apache.maven:maven-project:jar:2.0.6:runtime,org.apache.maven:maven-core=org.apache.maven:maven-core:jar:2.0.6:runtime,org.apache.maven:maven-toolchain=org.apache.maven:maven-toolchain:jar:1.0:runtime}
[DEBUG]   (f) printSummary = true
[DEBUG]   (f) project = MavenProject: com.mycompany.service:LocationServiceIntTest:10.01 @ c:\dev\LocationService\IntegrationTest\pom.xml
[DEBUG]   (f) projectArtifactMap = {junit:junit=junit:junit:jar:4.4:test,org.unitils:unitils-core=org.unitils:unitils-core:jar:3.1:compile,commons-logging:commons-logging=commons-logging:commons-logging:jar:1.1:compile,commons-lang:commons-lang=commons-lang:commons-lang:jar:2.4:compile,commons-collections:commons-collections=commons-collections:commons-collections:jar:3.2:compile,ognl:ognl=ognl:ognl:jar:2.6.9:compile,org.unitils:unitils-testng=org.unitils:unitils-testng:pom:3.1:compile,org.testng:testng=org.testng:testng:jar:jdk15:5.8:compile,org.apache.axis2:axis2=org.apache.axis2:axis2:jar:1.5.1:compile,org.apache.ws.commons.axiom:axiom-impl=org.apache.ws.commons.axiom:axiom-impl:jar:1.2.8:compile,org.apache.ws.commons.axiom:axiom-api=org.apache.ws.commons.axiom:axiom-api:jar:1.2.8:compile,org.apache.geronimo.specs:geronimo-activation_1.1_spec=org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.0.1:compile,org.apache.geronimo.specs:geronimo-javamail_1.4_spec=org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.2:compile,jaxen:jaxen=jaxen:jaxen:jar:1.1.1:compile,xml-apis:xml-apis=xml-apis:xml-apis:jar:1.3.04:compile,xerces:xercesImpl=xerces:xercesImpl:jar:2.8.1:compile,org.apache.geronimo.specs:geronimo-stax-api_1.0_spec=org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile,org.codehaus.woodstox:wstx-asl=org.codehaus.woodstox:wstx-asl:jar:3.2.4:compile,org.apache.ws.commons.axiom:axiom-dom=org.apache.ws.commons.axiom:axiom-dom:jar:1.2.8:compile,axis:axis-wsdl4j=axis:axis-wsdl4j:jar:1.5.1:compile,org.apache.rampart:rampart-core=org.apache.rampart:rampart-core:jar:1.4:compile,org.apache.rampart:rampart-policy=org.apache.rampart:rampart-policy:jar:1.4:compile,org.apache.axis2:axis2-kernel=org.apache.axis2:axis2-kernel:jar:1.4:compile,javax.servlet:servlet-api=javax.servlet:servlet-api:jar:2.3:compile,commons-httpclient:commons-httpclient=commons-httpclient:commons-httpclient:jar:3.1:compile,commons-codec:commons-codec=commons-codec:commons-codec:jar:1.3:compile,commons-fileupload:commons-fileupload=commons-fileupload:commons-fileupload:jar:1.2:compile,org.apache.httpcomponents:httpcore=org.apache.httpcomponents:httpcore:jar:4.0-beta1:compile,org.apache.httpcomponents:httpcore-nio=org.apache.httpcomponents:httpcore-nio:jar:4.0-beta1:compile,wsdl4j:wsdl4j=wsdl4j:wsdl4j:jar:1.6.2:compile,backport-util-concurrent:backport-util-concurrent=backport-util-concurrent:backport-util-concurrent:jar:3.1:compile,org.apache.ws.commons.schema:XmlSchema=org.apache.ws.commons.schema:XmlSchema:jar:1.4.2:compile,org.apache.neethi:neethi=org.apache.neethi:neethi:jar:2.0.4:compile,org.apache.woden:woden-api=org.apache.woden:woden-api:jar:1.0M8:compile,org.apache.ant:ant=org.apache.ant:ant:jar:1.7.0:compile,org.apache.ant:ant-launcher=org.apache.ant:ant-launcher:jar:1.7.0:compile,xerces:xmlParserAPIs=xerces:xmlParserAPIs:jar:2.6.0:compile,org.apache.woden:woden-impl-dom=org.apache.woden:woden-impl-dom:jar:1.0M8:compile,annogen:annogen=annogen:annogen:jar:0.1.0:compile,org.apache.geronimo.specs:geronimo-jms_1.1_spec=org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1:compile,javax.mail:mail=javax.mail:mail:jar:1.4:compile,javax.activation:activation=javax.activation:activation:jar:1.1:compile,xalan:xalan=xalan:xalan:jar:2.7.0:compile,commons-io:commons-io=commons-io:commons-io:jar:1.4:compile,org.apache.axis2:axis2-codegen=org.apache.axis2:axis2-codegen:jar:1.4:compile,org.apache.axis2:axis2-adb=org.apache.axis2:axis2-adb:jar:1.4:compile,org.apache.axis2:axis2-xmlbeans=org.apache.axis2:axis2-xmlbeans:jar:1.4:compile,org.apache.xmlbeans:xmlbeans=org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile,org.apache.axis2:axis2-adb-codegen=org.apache.axis2:axis2-adb-codegen:jar:1.4:compile,org.apache.axis2:mex=org.apache.axis2:mex:jar:impl:1.4:compile,org.apache.axis2:axis2-mtompolicy=org.apache.axis2:axis2-mtompolicy:jar:1.4:compile,commons-discovery:commons-discovery=commons-discovery:commons-discovery:jar:0.2:compile,log4j:log4j=log4j:log4j:jar:1.2.15:compile,stax:stax-api=stax:stax-api:jar:1.0.1:compile,xmlbeans:xbean=xmlbeans:xbean:jar:2.1.0:compile,org.apache.ws.security:wss4j=org.apache.ws.security:wss4j:jar:1.5.4:compile,org.apache.santuario:xmlsec=org.apache.santuario:xmlsec:jar:1.4.1:compile,opensaml:opensaml=opensaml:opensaml:jar:1.1:compile,org.apache.axis:axis-ant=org.apache.axis:axis-ant:jar:1.4:compile,bouncycastle:bcprov-jdk15=bouncycastle:bcprov-jdk15:jar:132:compile,org.apache.ant:ant-nodeps=org.apache.ant:ant-nodeps:jar:1.7.0:compile,org.apache.axis2:addressing=org.apache.axis2:addressing:mar:1.4:compile,org.apache.rampart:rampart-trust=org.apache.rampart:rampart-trust:jar:1.4:compile,dom4j:dom4j=dom4j:dom4j:jar:1.6.1:compile,jdom:jdom=jdom:jdom:jar:1.0:compile,xom:xom=xom:xom:jar:1.0:compile,com.ibm.icu:icu4j=com.ibm.icu:icu4j:jar:2.6.1:compile,org.apache.rampart:rampart=org.apache.rampart:rampart:jar:1.4:compile,org.apache.rampart:rahas=org.apache.rampart:rahas:jar:1.4:compile,org.apache.geronimo.specs:geronimo-jaxws_2.1_spec=org.apache.geronimo.specs:geronimo-jaxws_2.1_spec:jar:1.0:compile}
[DEBUG]   (f) redirectTestOutputToFile = false
[DEBUG]   (f) remoteRepositories = [Repository[central|http://pacdcntdp01.cable.mycompany.com:8081/artifactory/repo],Repository[snapshots|http://pacdcntdp01.cable.mycompany.com:8081/artifactory/repo]]
[DEBUG]   (f) reportFormat = brief
[DEBUG]   (f) reportsDirectory = c:\dev\LocationService\IntegrationTest\target\surefire-reports
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@90288e
[DEBUG]   (f) testClassesDirectory = c:\dev\LocationService\IntegrationTest\target\test-classes
[DEBUG]   (f) testNGArtifactName = org.testng:testng
[DEBUG]   (f) testSourceDirectory = c:\dev\LocationService\IntegrationTest\src\test\java
[DEBUG]   (f) trimstackTrace = true
[DEBUG]   (f) useFile = true
[DEBUG]   (f) useManifestOnlyJar = true
[DEBUG]   (f) workingDirectory = c:\dev\LocationService\IntegrationTest
[DEBUG] -- end configuration --
[INFO] [surefire:test {execution: default-test}]
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG]   org.apache.maven.surefire:surefire-booter:jar:2.4.3:runtime (selected for runtime)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.4.3:runtime (selected for runtime)
[DEBUG] Adding to surefire booter test classpath: C:\Documents and Settings\swall2633c\.m2\repository\org\apache\maven\surefire\surefire-booter\2.4.3\surefire-booter-2.4.3.jar
[DEBUG] Adding to surefire booter test classpath: C:\Documents and Settings\swall2633c\.m2\repository\org\apache\maven\surefire\surefire-api\2.4.3\surefire-api-2.4.3.jar
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG]   org.testng:testng:jar:jdk15:5.8:compile (selected for compile)
[DEBUG] Adding to surefire booter test classpath: C:\Documents and Settings\swall2633c\.m2\repository\org\testng\testng\5.8\testng-5.8-jdk15.jar
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG] Retrieving parent-POM: org.apache.maven.surefire:surefire-providers:pom:2.4.3 for project: null:surefire-testng:jar:null from the repository.
[DEBUG] Adding managed dependencies for unkNown:surefire-testng
[DEBUG]   org.apache.maven.surefire:surefire-api:jar:2.4.3
[DEBUG]   org.apache.maven.surefire:surefire-booter:jar:2.4.3
[DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.5.1
[DEBUG]   org.apache.maven.surefire:surefire-testng:jar:2.4.3:test (selected for test)
[DEBUG]     org.apache.maven:maven-artifact:jar:2.0:test (selected for test)
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4:test (selected for test)
[DEBUG]     junit:junit:jar:3.8.1:test (selected for test)
[DEBUG]     org.testng:testng:jar:jdk15:5.7:test (selected for test)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.4.3:test (selected for test)
[DEBUG] Adding to surefire test classpath: C:\Documents and Settings\swall2633c\.m2\repository\org\apache\maven\surefire\surefire-testng\2.4.3\surefire-testng-2.4.3.jar
[DEBUG] Adding to surefire test classpath: C:\Documents and Settings\swall2633c\.m2\repository\org\apache\maven\maven-artifact\2.0\maven-artifact-2.0.jar
[DEBUG] Adding to surefire test classpath: C:\Documents and Settings\swall2633c\.m2\repository\org\codehaus\plexus\plexus-utils\1.0.4\plexus-utils-1.0.4.jar
[DEBUG] Adding to surefire test classpath: C:\Documents and Settings\swall2633c\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar
[DEBUG] Adding to surefire test classpath: C:\Documents and Settings\swall2633c\.m2\repository\org\apache\maven\surefire\surefire-api\2.4.3\surefire-api-2.4.3.jar
[DEBUG] Test Classpath :
[DEBUG]   c:\dev\LocationService\IntegrationTest\target\test-classes
[DEBUG]   c:\dev\LocationService\IntegrationTest\target\classes
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\junit\junit\4.4\junit-4.4.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\commons-logging\commons-logging\1.1\commons-logging-1.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\commons-collections\commons-collections\3.2\commons-collections-3.2.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\ognl\ognl\2.6.9\ognl-2.6.9.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\unitils\unitils-core\3.1\unitils-core-3.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\testng\testng\5.8\testng-5.8-jdk15.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2\1.5.1\axis2-1.5.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\commons\axiom\axiom-impl\1.2.8\axiom-impl-1.2.8.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\commons\axiom\axiom-api\1.2.8\axiom-api-1.2.8.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.0.1\geronimo-activation_1.1_spec-1.0.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.2\geronimo-javamail_1.4_spec-1.2.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\jaxen\jaxen\1.1.1\jaxen-1.1.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\xerces\xercesImpl\2.8.1\xercesImpl-2.8.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\codehaus\woodstox\wstx-asl\3.2.4\wstx-asl-3.2.4.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\ws\commons\axiom\axiom-dom\1.2.8\axiom-dom-1.2.8.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\axis\axis-wsdl4j\1.5.1\axis-wsdl4j-1.5.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\rampart\rampart-core\1.4\rampart-core-1.4.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\rampart\rampart-policy\1.4\rampart-policy-1.4.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\axis2\axis2-kernel\1.4\axis2-kernel-1.4.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\commons-fileupload\commons-fileupload\1.2\commons-fileupload-1.2.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\httpcomponents\httpcore\4.0-beta1\httpcore-4.0-beta1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.0-beta1\httpcore-nio-4.0-beta1.jar
[DEBUG]   C:\Documents and Settings\swall2633c\.m2\repo

解决方法

我无法弄清楚你是如何让JUnit 4与所有依赖项一起运行的,但我确实注意到你对TestNG Unitils工件的依赖是导致问题的原因.

请注意,为了让我的测试工作,我不得不删除存储库,除了编译器和surefire以及apache wallart依赖项之外的插件.

为了获得运行示例JUnit 4测试用例,我所做的三个更改是:

>从surefire配置中删除junitArtifactName元素
>将junit工件从dependencyManagement部分移动到依赖关系部分
>从依赖项中删除unitils-testng工件.你把它列为有一种pom的东西,这更没意义.

请注意,unitils-core也是pom类型,这没什么意义.

java – Maven 2未运行Junit 4测试的更多相关文章

  1. ios – 使用MonoTouch,HttpClient和Charles Proxy时的HTTP流量监控问题

    我是HttpClient类的新手,我遇到了使用CharlesProxy监视请求的问题.基本上我需要的是监视从模拟器或实际iOS设备发出的请求.Here您可以找到有关如何配置CharlesforiOS开发的精彩教程.我正在制作简单的HttpClient请求,只是一个简单的授权代码有效,用户正在被授权,并且正在返回承载令牌.但是问题是,我在模拟器上的请求没有出现在Charleshttp流量监控列表中.

  2. iOS 10 Safari问题在DOM中不再包含元素

    使用此链接,您可以重现该错误.https://jsfiddle.net/pw7e2j3q/如果您点击元素并从dom中删除它,然后单击链接测试.你应该看到旧的元素弹出选择.是否有一些黑客来解决这个问题?解决方法我能够重现这个问题.问题是,每当您尝试删除其更改事件上的选择框时,iOS10都无法正确解除对选择框的绑定.要解决此问题,您需要将代码更改事件代码放在具有一些超时

  3. ios – 有没有办法针对存档版本(.ipa)运行XCTest(UI)?

    要么我们可以单独构建和测试,以便我们可以先构建并在以后对该构建进行测试吗?

  4. ios app如何“知道”运行单元测试

    我知道我可以用xcodebuild开始我的应用程序的单元测试,但我想知道是什么告诉应用程序在启动期间运行测试,它是一个发送到应用程序的特殊参数,还是以不同的方式编译以运行测试?

  5. ios – 如何在Swift中正确转换为子类?

    我有一个带有许多不同单元格的UITableView,基于数据源内容数组中的内容,它们应该显示自定义内容.在这里我得到了错误UITableViewCell没有属性customLabelQuestionTableViewCell有哪些.我的演员到QuestionTableViewCell有什么问题?解决方法问题不是你的演员,而是你的细胞宣言.您将其声明为可选的UITableViewCell,并且该声明

  6. iOS推送通知适用于Dev而不是Enterprise Distribution

    本网站上没有其他问题,我已经能够找到实际上提出了Dev将工作的原因,但企业分布不会.为什么归档总是使aps环境生产?

  7. xcode – 添加OCMock会导致Test启动主应用程序而不是运行测试

    我正在尝试将Ocmock添加到我现有的Cocoa项目中,但我遇到了一个我没有看到其他人覆盖的奇怪问题.我最终将它分离到以下内容:如果我只是将Ocmock.framework引用添加到我的项目中(即以某种方式将其拖到LinkBinaryWithLibraries构建阶段),当我运行测试时,真正的应用程序将被启动.没有Ocmock,输出正常:使用Ocmock框架链接(部分输出):此后,其他应用程序输出

  8. Xcode:用于条件DEBUG / TEST代码的预处理器宏

    我在我的代码(例如AppDelegate.m)中有不应该为单元测试编译的部分,例如当您在创建新项目时选择“添加单元测试”时,目标是由Xcode设置的.在项目文件中,我已将标志CONfigURATION_TESTS添加到内置目标的MyAppTests的预处理器宏中,但未添加到MyApp目标.这是我发现的许多帖子中的建议方式.但是这不起作用,因为(我猜)MyAppTests目标将MyApp目标作为依赖

  9. ios – 嵌套递归函数

    我试图做一个嵌套递归函数,但是当我编译时,编译器崩溃.这是我的代码:编译器记录arehere解决方法有趣的…它似乎也许在尝试在定义之前捕获到内部的引用时,它是bailing?以下修复它为我们:当然没有嵌套,我们根本没有任何问题,例如以下工作完全如预期:我会说:报告!

  10. ios – testflight库和Xcode 5没有变化现在说“ld:找不到-lTestFlight的库”

    我已经创建了几个月的应用程序,突然Xcode5不想构建它.它只是抱怨以下错误.如果我理解它可以,它会抱怨testflight,但我几周没有改变它.它完美地编译了它.我不得不说我已经尝试将AdobeADMS跟踪库添加到项目中.然后,出现链接器错误.任何提示?

随机推荐

  1. 基于EJB技术的商务预订系统的开发

    用EJB结构开发的应用程序是可伸缩的、事务型的、多用户安全的。总的来说,EJB是一个组件事务监控的标准服务器端的组件模型。基于EJB技术的系统结构模型EJB结构是一个服务端组件结构,是一个层次性结构,其结构模型如图1所示。图2:商务预订系统的构架EntityBean是为了现实世界的对象建造的模型,这些对象通常是数据库的一些持久记录。

  2. Java利用POI实现导入导出Excel表格

    这篇文章主要为大家详细介绍了Java利用POI实现导入导出Excel表格,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

  3. Mybatis分页插件PageHelper手写实现示例

    这篇文章主要为大家介绍了Mybatis分页插件PageHelper手写实现示例,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪

  4. (jsp/html)网页上嵌入播放器(常用播放器代码整理)

    网页上嵌入播放器,只要在HTML上添加以上代码就OK了,下面整理了一些常用的播放器代码,总有一款适合你,感兴趣的朋友可以参考下哈,希望对你有所帮助

  5. Java 阻塞队列BlockingQueue详解

    本文详细介绍了BlockingQueue家庭中的所有成员,包括他们各自的功能以及常见使用场景,通过实例代码介绍了Java 阻塞队列BlockingQueue的相关知识,需要的朋友可以参考下

  6. Java异常Exception详细讲解

    异常就是不正常,比如当我们身体出现了异常我们会根据身体情况选择喝开水、吃药、看病、等 异常处理方法。 java异常处理机制是我们java语言使用异常处理机制为程序提供了错误处理的能力,程序出现的错误,程序可以安全的退出,以保证程序正常的运行等

  7. Java Bean 作用域及它的几种类型介绍

    这篇文章主要介绍了Java Bean作用域及它的几种类型介绍,Spring框架作为一个管理Bean的IoC容器,那么Bean自然是Spring中的重要资源了,那Bean的作用域又是什么,接下来我们一起进入文章详细学习吧

  8. 面试突击之跨域问题的解决方案详解

    跨域问题本质是浏览器的一种保护机制,它的初衷是为了保证用户的安全,防止恶意网站窃取数据。那怎么解决这个问题呢?接下来我们一起来看

  9. Mybatis-Plus接口BaseMapper与Services使用详解

    这篇文章主要为大家介绍了Mybatis-Plus接口BaseMapper与Services使用详解,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪

  10. mybatis-plus雪花算法增强idworker的实现

    今天聊聊在mybatis-plus中引入分布式ID生成框架idworker,进一步增强实现生成分布式唯一ID,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

返回
顶部