2 Replies Latest reply: May 15, 2012 5:30 AM by eildosa RSS

    Cannot retrieve EJB dependencies from Jboss repo

    eildosa Newbie

      Hi,

       

      I made an EJB 3.0 and a client.

      In my EJB I putted :

       

      [code]

        <repositories>

          <repository>

            <id>Jboss</id>

            <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>

          </repository>

        </repositories>

       

       

        <dependencies>

          <dependency>

            <groupId>javax</groupId>

            <artifactId>javaee-api</artifactId>

            <version>6.0</version>

            <scope>provided</scope>

          </dependency>

                <dependency>

                            <groupId>org.jboss.ejb3</groupId>

                            <artifactId>jboss-ejb3-ext-api</artifactId>

                            <version>1.0.0</version>

                </dependency>

          <dependency>

                            <groupId>org.jboss.ejb3</groupId>

                            <artifactId>jboss-ejb3-ext-api-impl</artifactId>

                            <version>1.0.0</version>

                </dependency>

        </dependencies>

      [/code]

       

      But jboss-ejb3-ext-api and it's implementation cannot be retrieved :/

      eclipse is telling me :

       

      The container 'Maven Dependencies' references non existing library 'C:\usr\local\m2-repository\org\jboss\ejb3\jboss-ejb3-ext-api\1.0.0\jboss-ejb3-ext-api-1.0.0.jar'MyFirstMavenEjb

       

      In my client I just added "jnp-client", and there is not problem about retrieving this one.

       

      Any idea why I can't retrieve those 2 jars?

      Thanks.

        • 1. Re: Cannot retrieve EJB dependencies from Jboss repo
          Stephen Coy Master

          Its likely that Maven has cached the fact that an earlier attempt to retrieve these artifacts has failed.

           

          Try deleting the content of C:\usr\local\m2-repository\org\jboss\ejb3\jboss-ejb3-ext-api\1.0.0\ and trying again.

          • 2. Re: Cannot retrieve EJB dependencies from Jboss repo
            eildosa Newbie

            oops, forgot to post the awnser.

             

            In fact I had the same problem with several artifacts from Jboss's repo.

             

            Those artifacts were trying to retrieve transitive dependancy from an other Jboss's repo wich access was being denied.

            Since it was downloading those other jar first it always failed before being able to retrieve the jar I wanted.

            I found out by trying "mvn clean install" in cmd :

             

            old repo.png

             

            In the end I had to add all those exclusions to make it work :

             

            [code]

                                     <exclusions>

                                            <exclusion>

                                                 <groupId>gnu-getopt</groupId>

                                                 <artifactId>getopt</artifactId>

                                            </exclusion>

                                            <exclusion>

                                                 <groupId>apache-xerces</groupId>

                                                 <artifactId>xml-apis</artifactId>

                                            </exclusion>

                                            <exclusion>

                                                 <groupId>apache-xerces</groupId>

                                                 <artifactId>xercesImpl</artifactId>

                                            </exclusion>

                                            <exclusion>

                                                 <groupId>wutka-dtdparser</groupId>

                                                 <artifactId>dtdparser121</artifactId>

                                            </exclusion>

                                            <exclusion>

                                                 <groupId>sun-jaxb</groupId>

                                                 <artifactId>jaxb-api</artifactId>

                                            </exclusion>

                                  </exclusions>

            [/code]

             

            Ce message a été modifié par: eildosa grammar corrections