Version 1

    There are two great community pages full of useful information on how to onfigure maven to build JBoss project:

     

    Presented here is a summary of the above links, with precisely the maven settings required to build RichFaces.

     

    Configuring Maven to use the JBoss Repository

    The repository has a single repository group URL that can be used to download artifacts from multiple repositories.

     

    http://repository.jboss.org/nexus/content/groups/public/

     

    To use dependencies from the jboss.org repository this URL will need to be added to your Maven settings.  Maven includes a default settings.xml file located in $MAVEN_HOME/conf/settings.xml and also looks for a user settings file located in $HOME/.m2 (more about Maven settings).  It is recommended that you not modify the default Maven settings file.  Instead, you should copy the default settings.xml file to your .m2 directory and make modifications to this new file.  A complete example is also available (Maven Settings Example - Users).  The following snippet (or something similar) should be included in the user settings.xml to use the JBoss repository.

     

    <settings>
      ...
      <profiles>
        ...
        <profile>
          <id>jboss-public-repository</id>
          <repositories>
         <repository>
           <id>jboss-public-repository-group</id>
           <name>JBoss Public Repository Group</name>
           <url>http://repository.jboss.org/nexus/content/groups/public/</url>
           <layout>default</layout>
           <releases>
             <enabled>true</enabled>
             <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
              <enabled>true</enabled>
              <updatePolicy>never</updatePolicy>
            </snapshots>
          </repository>
        </repositories>
        <pluginRepositories>
          <pluginRepository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
            <releases>
              <enabled>true</enabled>
            </releases>
            <snapshots>
              <enabled>true</enabled>
            </snapshots>
          </pluginRepository>
        </pluginRepositories>
        </profile>
    
      </profiles>
    
      <activeProfiles>
        <activeProfile>jboss-public-repository</activeProfile>
      </activeProfiles>
      ...
    </settings>