1 Reply Latest reply on Nov 1, 2013 9:01 AM by Radim Hanus

    maven dependencies

    jnovotny Newbie

      Hi,

       

      I'm trying to convert an Ant script to Maven- I read the Maven docs and added the following to my repositories:

       

      <repository>

                  <id>jboss-public-repository-group</id>

                  <name>JBoss Public Maven Repository Group</name>

                  <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>

                  <layout>default</layout>

                  <releases>

                      <enabled>true</enabled>

                      <updatePolicy>never</updatePolicy>

                  </releases>

                  <snapshots>

                      <enabled>true</enabled>

                      <updatePolicy>never</updatePolicy>

                  </snapshots>

              </repository>

       

      I also tried adding the spec. dependency

       

      <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>

       

      but when compiling I get a bunch of unresolved issues:

       

      package org.jboss.resteasy.client does not exist

      package org.jboss.ejb3.annotation does not exist

      package org.hornetq.api.jms does not exist

      package org.jboss.ejb.client does not exist

       

      I don't want to have to hunt each and every jboss jar down-- is there a way to specify one dependency for jboss-eap ?

       

      Thanks, Jason

        • 1. Re: maven dependencies
          Radim Hanus Expert

          you supplied only a bill of materials (BOM) which specifies the correnct versions of Java EE 6 APIs artefacts

          but dependencies to particular java ee apis are missing...

           

          <dependencyManagement>

               <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>

          </dependencyManagement>

          <dependencies>

               <dependency>

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

                 <artifactId>jboss-ejb-api_3.1_spec</artifactId>

                 <scope>provided</scope>

               </dependency>

               <dependency>

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

           

                    <artifactId>jboss-jms-api_1.1_spec</artifactId>

                    <scope>provided</scope>

               </dependency>    

               ...

          </dependencies>

           

          >> I don't want to have to hunt each and every jboss jar down-- is there a way to specify one dependency for jboss-eap ?

          <dependencies>

               <dependency>

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

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

                      <version>3.0.2.Final</version>

                      <scope>provided</scope>

               </dependency>

          </dependencies>