jeudi 27 août 2015

Run Managed Wildfly instead of Embedded WIldfly with Arquillian

It seems Embedded Wildfly does not support @Asynchronous method. I want to use not embedded version of Wildfly with arquillian. What should be change in the following configuration?

        <!--Arquillian JUnit integration: -->
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <version>1.1.8.Final</version>
            <scope>test</scope>
        </dependency>
        <!--Container adapter for Wildfly START:-->
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-arquillian-container-embedded</artifactId>
            <version>8.2.1.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-embedded</artifactId>
            <version>8.2.1.Final</version>
            <scope>test</scope>
        </dependency>
        <!--Container adapter for Wildfly end -->
        <!--test scopes ends-->

    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <version>1.1.0.Alpha1</version>
            </plugin>
            <!--You need the maven dependency plugin to download locally a zip with the server, unless you provide your own, it will download under the /target directory -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wildfly</groupId>
                                    <artifactId>wildfly-dist</artifactId>
                                    <version>8.2.1.Final</version>
                                    <type>zip</type>
                                    <overWrite>false</overWrite>
                                    <outputDirectory>target</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <!-- Fork every test because it will launch a separate AS instance -->
                    <forkCount>1</forkCount>
                    <reuseForks>false</reuseForks>
                    <argLine>-Djboss.http.port=8181</argLine>
                    <systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <!-- the maven dependency plugin will have already downloaded the server on /target -->
                        <jboss.home>${project.basedir}/target/wildfly-8.2.1.Final</jboss.home>
                        <module.path>${project.basedir}/target/wildfly-8.2.1.Final/modules</module.path>
                    </systemPropertyVariables>
                    <redirectTestOutputToFile>false</redirectTestOutputToFile>
                </configuration>
            </plugin>
        </plugins>
    </build>

I tried:

<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-arquillian-container-managed</artifactId>
    <version>8.2.1.Final</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-server</artifactId>
    <version>8.2.1.Final</version>
    <scope>test</scope>
</dependency>

But without success

Aucun commentaire:

Enregistrer un commentaire