1 Reply Latest reply on Dec 7, 2013 1:51 AM by guangbo chen

    Failed to load EAP-6.1 Maven reponsitory

    guangbo chen Newbie

      Hi guys

      I'm trying to create a Java EE Web project by using the template that is provided by the Jboss center,

      but I have run into a maven dependency problem and can't solve it properly in many days, can anyone kindly point out where is my problem, thanks in advances.

      The pom.xml file contains following error:

      Project build error: Non-resolvable import POM: Could not find artifact org.jboss.bom.eap:jboss-javaee-6.0-with-tools:pom:6.2.0-build-5 in jboss-eap-repository (file:///Users/rainbo/guangbo/Server/jboss-eap-6.1.0.GA-maven-repository/) with the pom.xml file looks like below.

      <properties>

              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

              <!-- JBoss dependency versions -->

              <version.jboss.maven.plugin>7.4.Final</version.jboss.maven.plugin>

              <!-- Define the version of the JBoss BOMs we want to import to specify

                  tested stacks. -->

              <version.jboss.bom.eap>6.2.0-build-5</version.jboss.bom.eap>

              <!-- other plugin versions -->

              <version.surefire.plugin>2.10</version.surefire.plugin>

              <version.war.plugin>2.1.1</version.war.plugin>

              <!-- maven-compiler-plugin -->

              <maven.compiler.target>1.6</maven.compiler.target>

              <maven.compiler.source>1.6</maven.compiler.source>

          </properties>

          <dependencyManagement>

              <dependencies>

                  <dependency> --- error occurs here

                      <groupId>org.jboss.bom.eap</groupId>

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

                      <version>${version.jboss.bom.eap}</version>

                      <type>pom</type>

                      <scope>import</scope>

                  </dependency>

                  <dependency>  --- error occurs here

                      <groupId>org.jboss.bom.eap</groupId>

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

                      <version>${version.jboss.bom.eap}</version>

                      <type>pom</type>

                      <scope>import</scope>

                  </dependency>

              </dependencies>

          </dependencyManagement>

       

      and my .m2/setting.xml file is:

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

      <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

        <profiles>

          <!-- Configure the JBoss EAP Maven repository -->

          <profile>

            <id>jboss-eap-6-1-0-GA-maven-repository</id>

            <repositories>

              <repository>

                <id>jboss-eap-repository</id>

                <name>JBoss EAP Maven Repository</name>

                <url>file:///Users/guangbo/Desktop/Server/jboss-eap-6.1.0.GA-maven-repository/</url>

                <layout>default</layout>

                <releases>

                  <enabled>true</enabled>

                  <updatePolicy>never</updatePolicy>

                </releases>

                <snapshots>

                  <enabled>false</enabled>

                  <updatePolicy>never</updatePolicy>

                </snapshots>

              </repository>

            </repositories>

            <pluginRepositories>

              <pluginRepository>

                <id>jboss-eap-repository</id>

                <name>JBoss EAP Maven Repository</name>

                <url>file:///Users/guangbo/Desktop/Server/jboss-eap-6.1.0.GA-maven-repository/</url>

                <layout>default</layout>

                <releases>

                  <enabled>true</enabled>

                  <updatePolicy>never</updatePolicy>

                </releases>

                <snapshots>

                  <enabled>false</enabled>

                  <updatePolicy>never</updatePolicy>

                </snapshots>

              </pluginRepository>

            </pluginRepositories>

          </profile>

        </profiles>

        <activeProfiles>

          <!-- Optionally, make the repositories active by default -->

        <activeProfile>jboss-eap-6-1-0-GA-maven-repository</activeProfile>

        </activeProfiles>

      </settings>

       

      I have followed the https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.1/html-single/Development_Gui… jboss developement guide to install everything properly and I could run quickstart example project...  so can anyone helps me out please, many thanks.

        • 1. Re: Failed to load EAP-6.1 Maven reponsitory
          guangbo chen Newbie

          For anyone who has faced the same issue the solution is that you have to

          remove the cached repository/ subdirectory located under the .m2/directory before attempting to use the new Maven repository.

          simply backup the old reponsitroy and put in somewhere if u like, then empty the reponsitory folder, finally the maven will reload the new dependecies for you as the project requires.