2013-09-30 25 views
1

我想在Tomcat远程7上运行Arquillian的测试。下面是一个非常简单的示例,用于重现我的问题。在tomcat remote 7上运行Arquillian的JUnit尝试加载... remote_6.TomcatRemoteExtension

POM依赖

<dependencies> 
    <dependency> 
     <groupId>org.jboss.arquillian.junit</groupId> 
     <artifactId>arquillian-junit-container</artifactId> 
     <version>1.1.1.Final</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.jboss.arquillian.container</groupId> 
     <artifactId>arquillian-tomcat-remote-7</artifactId> 
     <version>1.0.0.CR5</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>javax.servlet-api</artifactId> 
     <version>${servlet.version}</version> 
     <scope>test</scope> 
    </dependency> 

</dependencies> 

arqullian.xml

http://jboss.org/schema/arquillian/arquillian_1_0.xsd“>

<container qualifier="tomcat-remote-7"> 
    <configuration> 
     <property name="host">localhost</property> 
     <property name="jmxPort">8089</property> 
     <property name="bindHttpPort">8080</property> 
     <property name="user">arquillian</property> 
     <property name="pass">arquillian</property> 
    </configuration> 
</container> 

SimpleTest.java

@RunWith(Arquillian.class) 
public class SimpleTest { 
@Deployment 
@OverProtocol("Servlet 3.0") 
public static Archive<WebArchive> createDeployment() { 
    File warFile = new File("../myproject/target/mywar.war"); 
    WebArchive webArchive = ShrinkWrap.createFromZipFile(WebArchive.class, warFile); 
    return webArchive; 
} 

@Test 
public void testSimple() { 
    assertTrue(true); 
} 

}

运行SimpleTest的经过我长期做下去堆栈跟踪,其中在最后,我看到:

Caused by: java.lang.ClassNotFoundException: 
org.jboss.arquillian.container.tomcat.remote_6.TomcatRemoteExtension 

我不知道为什么它会尝试加载TomcatRemoteExtension for version 6当我有依赖版本7时

回答