Version 6

    If your application requires the JBoss Enterprise Maven Repositories (EAP6, WFK), you need to make sure Maven knows about them.

     

    If you haven't setup an Enterprise Repository Manager to mirror the JBoss Enterprise Maven repositories, you will need to download and install them locally, following these instructions.

     

    You can then either chose to use the JBoss Tools / JBDS Maven Repositories Wizard  to configure your Maven settings or do it completely manually.

     

    Maven Repositories Wizard

     

    Open Window > Preferences > JBoss Tools > JBoss Maven Integration and click on the "Configure Maven Repositories..." button. Alternatively, you can do ar Quick-Fix (Ctrl+1) on your maven dependency error marker and  select "Configure Maven Repositories":

     

    configure_maven_repo_prefs.png quickfix.png

     

    The wizard lists all the repositories in your settings. Click on the "Add Repository..." button to add a new entry.

    maven_repositories_wizard.png

     

     

    The "Add Maven Repository" dialog starts empty. Clicking on "Recognize JBoss Maven Enterprise Repositories..." will let you select the location of the maven repository you unzipped on your disk.

    The wizard will automatically determine if it's a EAP or WFK repository.

    add_maven_repo.png

     

    Clicking on "OK", you'll see a preview of the modifications that will be performed on your settings : a new profile containing the new repository will be added.

    settings_preview.png

     

    Clicking on finish, you'll be asked if you really want to proceed and modify the settings.xml.

     

    Manual modifications

    Locate the settings.xml in your <user_directory>/.m2e/ or the <your_maven_installation_directory>/conf/ (for example: /home/developer/apps/apache-maven-3.0.3/conf/settings.xml)

    Copy the following code sample into settings.xml, substituting the URL for your path to the repository: Create a profile for each JBoss Enterprise repository you have (EAP, WFK).

     

    <settings>
          ...
          <profiles>
            ...
            <profile>
              <id>jboss-xxx-repository</id>
              <repositories>
                <repository>
                  <id>jboss-xxx-repository</id>
                  <name>JBoss XXX Maven Repository</name>
                  <url>
                  file:///path/to/repo/jboss-xxx-repository/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-xxx-repository-group</id>
                  <name>JBoss XXX Maven Repository</name>
                  <url>
                file:///path/to/repo/jboss-xxx-repository/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>
            <activeProfile>jboss-xxx-repository</activeProfile>
          </activeProfiles>
          ...
    </settings>