0 Replies Latest reply on Jan 11, 2013 1:28 PM by Luigi Bitonti

    arquillian weld 2.0

    Luigi Bitonti Newbie

      Hi All,

       

      I am "playing" with Weld 2.0.0 Beta2, writing a JSF application. I tried to use Arquillian for integration testing, using the following Maven pom.xml ()

       

      ...

       

              <!-- test properties -->

              <version.arquillian>1.0.3.Final</version.arquillian>

              <version.arquillian.container>1.0.0.CR5</version.arquillian.container>

              <version.junit>4.10</version.junit>

              <version.specs>3.0.1.Final</version.specs>

      ...

       

          <dependencies>

              <dependency>

                  <groupId>org.jboss.weld</groupId>

                  <artifactId>weld-core</artifactId>

                  <version>2.0.0.Beta2</version>

              </dependency>

              <!-- Test Dependencies -->

               <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

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

                  <scope>test</scope>

              </dependency>

              <dependency>

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

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

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

                  <type>pom</type>

                  <scope>provided</scope>

              </dependency>

              <dependency>

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

                  <artifactId>arquillian-junit-container</artifactId>

                  <scope>test</scope>

              </dependency>

              <dependency>

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

                  <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>

                  <version>${version.arquillian.container}</version>

                  <scope>test</scope>

              </dependency>

      ...

       

      But running the tests I get this error:

       

      java.lang.NoSuchMethodError: org.jboss.weld.bootstrap.spi.BeansXml.getEnabledAlternativeStereotypes()Ljava/util/List;

          at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.BeansXmlUtil.removeDuplicate(BeansXmlUtil.java:14)

          at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer.<init>(TestContainer.java:221)

          at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer.deploy(WeldEEMockContainer.java:99)

      ...

       

       

      My solution was to clone the arquillian-parent-weld repository from GitHub and create an arquillian-weld-ee-embedded-2.0 project from the corresponding arquillian-weld-ee-embedded-1.1 project. Not many changes were needed at all. I wonder if what I did is right or there's a better/simpler way of doing this? Does anyone have suggestions?

       

      Thanks,

      Luigi