5 Replies Latest reply on Mar 4, 2015 8:22 AM by Aslak Knutsen

    Arquillian Tests on glassfish 4.1

    b69 Newbie

      Were to find actual documentation of setup and maybe how to overcome yet known pitfalls w.r.t. running arquillian tests on glassfish 4.1 or any other container complying with EE7? The actual project is configured to run on GF 3.1.2 and WebSphere 8.5 both EE6. In this form it runs on both Application Servers and on GF 4.1, no question! But it should be ported to EE7. At first actual information to setup the maven pom is required. Having a sound base further issues could then be resolved step by step.

      Thanks for any hint.

        • 2. Re: Arquillian Tests on glassfish 4.1
          b69 Newbie

          Thanks Aslak,

          yes I saw those samples already before, but:

          I was and I'm still confused about the artefactIds declaration like: arquillian-glassfish-remote-3.1 or arquillian-glassfish-embedded-3.1 though we have version 4.0 declared for glassfish-embedded-all!

          Further I deduce additional Dependencies jersey, grizzly must be declared. I can see what apparently must be done, but I don't understand why and what happens if it is not declared. Short, I don't understand the behind of it, but I would very much like to understand it.

          Further, apparently we can change to the version 4.1 with the commandline argument -Dglassfish.version=4.1. Can this argument be configured within the container declaration within the pom too, or must it be given on the commandline for a manual mvn call or on the jre tab of the run configuration in eclipse?

          I'll try whith what I know actually, but knowing deeper would be helpful.

          • 3. Re: Arquillian Tests on glassfish 4.1
            Aslak Knutsen Master

            For GlassFish embedded the only extra dependency besides the adapter is the org.glassfish.main.extras:glassfish-embedded-all artifact.

             

            The adapter is called glassfish-embedded-3.1 because that is the 'earlies version' it works with. It will work with > 3.1 up until there is another adapter with a higher version number.

             

            If you define the glassfish version number in the pom as a property you can set it via the command line like you say:

             

            <properties>

            <glassfish.version>4.1</glassfish.version>

            </properties>

             

            <dependency>

            <groupId>org.glassfish.main.extras</groupId>

            <artifactId>glassfish-embedded-all</artifactId>

            <version>${glassfish.version}</version>

            </dependency>


            mvn clean install -Dglassfish.version=4.0  <-- should set the glassfish version to 4.0 when you run

            1 of 1 people found this helpful
            • 4. Re: Arquillian Tests on glassfish 4.1
              b69 Newbie

              Thanks Aslak,

              Good to know, and it works. Sorry for my late answer. I have more than one project running and time is short! Beside, the same project is also running on WebSpere 8.5.5. I tried to define the test container like:

              <dependency>

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

                <artifactId>arquillian-was-remote-8.5</artifactId>

                <version>1.0.0.Beta2</version>

                <scope>test</scope>

              </dependency>

              But maven tells me it can not be found. I'm reading now how to define a container adapter. I hope to get it this way.

              • 5. Re: Arquillian Tests on glassfish 4.1
                Aslak Knutsen Master

                The WAS containers are not officially released, only WLP. You can build them your self from here:

                arquillian/arquillian-container-was · GitHub