Maven Getting Started - Developers

Version 4

    This page provides information for JBoss developers to get started with using the JBoss Maven repositories.


    If you are new to Maven, you may want to first go to the Apache Maven site to learn the basics.  If you are already familiar with Maven, and want to learn how to use the JBoss Maven repositories in your builds, you are in the right place.


    Configuring Maven to use the JBoss Repository

    When developing JBoss projects, it is important that all project dependencies are available via the JBoss repository.  In order for your build to use artifacts from the JBoss Maven repository and to save artifacts from remote repositories, you will need to configure your build to use the developer repository group which will automatically include several remote repositories.  The following snippet from settings.xml shows what you need to use the JBoss repositories.



          <username> username</username>
          <password> password</password>
          <username> username</username>
          <password> password</password>
          <username> username</username>
          <password> password</password>
          <name> Developer Repository Group</name>


    This mirror setting will force Maven to use only a single URL for all dependency downloads.  Your username and password must be specified three times, one for each of (1) the repository group URL, (2) deployment to the snapshot repository, and (3) deployment to the releases repository.  Unfortunately, Maven does not currently have a proper way to assign multiple repository to the same credential information.


    Using Deprecated Artifacts


    The JBoss Maven repository has been reorganized to provide a cleaner and more flexible repository.  During this process many artifacts were moved to a deprecated repository.  If your build needs to continue to use these deprecated artifacts during the migration process, you can enable this repository using a profile.



              <name>JBoss Deprecated</name>


    (Optional) Using JBoss Maven Plugins


    Several JBoss projects include Maven plugins.  You can add configuration to your settings.xml which will allow Maven to use shorthand notation when referring to these plugins.





    Example Settings


    A complete example of settings.xml is also available ( Maven Settings Example - Developers ).



    Deploying Projects to the Repository


    You project pom.xml must be configured with the correct distributionManagement information in order to deploy to the repository.  There are several deployment scenarios in the normal development process.


    Maven Deploying a Snapshot


    Maven Deploying a Release


    Coming soon: Uploading a thirdparty jar


    Coming soon: Uploading a license restricted jar (for example some Sun jars)



    Using Thirdparty Maven Repositories


    The JBoss repository will automatically proxy artifacts from several thirdparty repositories.  The current list of proxy repositories can be seen by logging in to the Nexus interface ( ).


    If you would like to request additional thirdparty repositories to be proxied, please create a jira issue under the JBBUILD project.