mardi 19 septembre 2017

Arquillian container configuration exception: jbossHome 'target/wildfly-10.1.0.Final' must exist

I am testing with Arquillian and WildFly. But I get the following error:

org.jboss.arquillian.container.spi.ConfigurationException: jbossHome 'target/wildfly-10.1.0.Final' must exist

This is my pom configuration to test in a wildfly container:

..
<!-- BOM, o matriz de versiones, con las dependencias transitivas de Arquillian -->
<dependencyManagement>
    <dependencies>

        <dependency>
            <groupId>org.wildfly.bom</groupId>
            <artifactId>jboss-javaee-7.0-with-all</artifactId>
            <version>8.2.2.Final</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian</groupId>
            <artifactId>arquillian-bom</artifactId>
            <version>1.1.13.Final</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

    </dependencies>
</dependencyManagement>

..

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>7.0</version>
</dependency>

<!-- JUnit -->
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <scope>test</scope>
</dependency>

<!-- Integración Arquillian JUnit -->
<dependency>
    <groupId>org.jboss.arquillian.junit</groupId>
    <artifactId>arquillian-junit-container</artifactId>
    <scope>test</scope>
</dependency>

<!--  API de Java EE 7 -->
<dependency>
    <groupId>org.jboss.spec</groupId>
    <artifactId>jboss-javaee-7.0</artifactId>
    <version>1.1.0.Final</version>
    <type>pom</type>
    <scope>provided</scope>
</dependency>

<!-- Adaptador Arquillian para el contenedor -->

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

<!-- Ambiente de ejecución del contenedor (contenedor embebido) o cliente del contenedor (contenedor remoto) -->

<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-embedded</artifactId>
    <version>8.2.1.Final</version>
    <scope>test</scope>
</dependency>

..

<!-- 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>3.0.2</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>10.1.0.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.20.1</version>
        <configuration>
            <!-- Fork every test because it will launch a separate AS instance -->
            <forkMode>always</forkMode>
            <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-10.1.0.Final</jboss.home>
                <module.path>${project.basedir}/target/wildfly-10.1.0.Final/modules</module.path>
            </systemPropertyVariables>
            <redirectTestOutputToFile>false</redirectTestOutputToFile>
        </configuration>
    </plugin>  

..

Furthermnore, despite the fact that I have added: Djava.util.logging.manager=org.jboss.logmanager.LogManager as VM default arguments, I get this error too: Could not load Logmanager "org.jboss.logmanager.LogManager" java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager

Aucun commentaire:

Enregistrer un commentaire