防止Arquillian在每次测试前下载apache-tomee

时间:2015-08-29 10:45:32

标签: java maven testing jboss-arquillian

我是Arquillian的新手,我必须在旧项目中修复一些测试。

我注意到,由于某种原因,每次运行测试时,Arquillian都会下载apache-tomee-1.7.2-webprofile(我切换到最新版本1.7.2)。

有没有办法防止这种行为? (也许我必须添加一些maven依赖或启动脚本?)因为它需要永远运行所有测试。

这是我的Arquillian配置:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<arquillian xmlns="http://jboss.org/schema/arquillian"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
            http://jboss.org/schema/arquillian
            http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<container qualifier="tomee" default="true">
    <configuration>
        <property name="httpPort">-1</property>
        <property name="stopPort">-1</property>
        <property name="ajpPort">-1</property>
        <property name="simpleLog">true</property>
        <property name="cleanOnStartUp">true</property>
        <property name="dir">target/apache-tomee-remote</property>
        <property name="appWorkingDir">target/arquillian-test-working-dir</property>
    </configuration>
</container>

还有测试的maven依赖项(所有版本都是最新版本,取自parent.pom):

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.arquillian.junit</groupId>
        <artifactId>arquillian-junit-container</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.openejb</groupId>
        <artifactId>arquillian-tomee-remote</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.openejb</groupId>
        <artifactId>ziplock</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.shrinkwrap.resolver</groupId>
        <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.shrinkwrap</groupId>
        <artifactId>shrinkwrap-api</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.shrinkwrap.resolver</groupId>
        <artifactId>shrinkwrap-resolver-api-maven</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.arquillian.container</groupId>
        <artifactId>arquillian-container-test-api</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.jboss.arquillian.junit</groupId>
        <artifactId>arquillian-junit-core</artifactId>
        <scope>test</scope>
    </dependency>

0 个答案:

没有答案