2 Replies Latest reply: May 28, 2012 3:22 PM by Martin Borgman RSS

tutorial-getting stared arquillian.org

eric eric Newbie

I follow every steps of the excellent getting started guide of arquillian :

http://arquillian.org/guides/getting_started/?utm_source=cta

I find 2 troubleshooting during tis training :

1/ I need to put agin the 3 dependencies about org.mockito, org.hamcrest and net.avh4.util. I checked only the need for mockito dependency.

see page 3/33 § You can remove all the dependency elements ....in the guide

2/about jboss download with maven, the m2e plugin of eclipse 3.7 indigo don't support 'unpack goal' in execution :

DescriptionResourcePathLocationType
maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e.pom.xml/arquillian-tutorialline 143Maven Project Build Lifecycle Mapping Problem

Is there anay m2e solution ?

I succeeded in this step by command line :

mvn test -Parquillian-jbossas-managed

 

it is a very useful guide to start.

Best regards.

 

A new user of Arquilllian.

  • 1. Re: tutorial-getting stared arquillian.org
    Martin Borgman Newbie

    I can confirm the second problem, but not the first one.

     

    For the second problem I went back to the installed JBoss 7.1.1 but because I didn't like the way you have to set the JBOSS_HOME variable, I searched the documentation and came up with a better solution than the one documented.

    The JBoss AS managed pom.xml should look like this:

     

    <!-- clip -->

    <profile>

         <id>arquillian-jbossas-managed</id>

         <build>

              <plugins>

                   <plugin>

                        <groupId>org.apache.maven.plugins</groupId>

                        <artifactId>maven-surefire-plugin</artifactId>

                        <configuration>

                             <systemPropertyVariables>

                                  <arquillian.launch>jbossas_managed</arquillian.launch>

                             </systemPropertyVariables>

                        </configuration>

                   </plugin>

              </plugins>

         </build>

         <dependencies>

              <dependency>

                   <groupId>org.jboss.spec</groupId>

                   <artifactId>jboss-javaee-6.0</artifactId>

                   <version>1.0.0.Final</version>

                   <type>pom</type>

                   <scope>provided</scope>

              </dependency>

              <dependency>

                   <groupId>org.jboss.as</groupId>

                   <artifactId>jboss-as-arquillian-container-managed</artifactId>

                   <version>7.1.1.Final</version>

                   <scope>test</scope>

              </dependency>

              <dependency>

                   <groupId>org.jboss.arquillian.protocol</groupId>

                   <artifactId>arquillian-protocol-servlet</artifactId>

                   <scope>test</scope>

              </dependency>

         </dependencies>

    </profile>

    <!-- clip -->

     

    And add a src/test/resources/arquillian.xml with the following content:

     

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

       xmlns="http://jboss.org/schema/arquillian"

       xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

     

       <container qualifier="jbossas_managed" default="true">

          <protocol type="Servlet 3.0">

             <property name="executionType">MANAGED</property>

          </protocol>

          <configuration>

             <property name="jbossHome">${user.home}/jboss-as-7.1.1.Final/</property>

             <property name="allowConnectingToRunningServer">true</property>

          </configuration>

       </container>

     

    </arquillian>

     

    In which case I have JBoss AS 7.1.1 installed in my home directory.

    You can add other named container settings to this file.

     

    What I don't get is why I cant use the JBoss AS 7.1.1 already installed in Eclipse.

     

    By the way, great getting started guide.

  • 2. Re: tutorial-getting stared arquillian.org
    Martin Borgman Newbie

    How you use a container already installed in Eclipse is documented in the second part of the getting started guide:

    http://arquillian.org/guides/getting_started_rinse_and_repeat/