Maven Deploying a Snapshot

All JBoss developers can deploy snapshot builds to the JBoss repository.

 

In order to deploy to the snapshot repository, your POM (or parent POM) must be configured with the correct distributionManagement information.

 

 

  <distributionManagement>
    ...
    <snapshotRepository>
      <id>jboss-snapshots-repository</id>
      <name>JBoss Snapshots Repository</name>
      <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

 

It is recommended that your project inherits this information from the JBoss parent pom (version 6 or higher).

 

  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>6</version>
  </parent>

 

Once your POM is correctly configured, you can use mvn deploy to upload your project to the snapshots repository.

 

mvn deploy

 

After a successful deployment the upload can be verified via the Nexus UI, or by browsing the snapshot repository URL directly.

 

https://repository.jboss.org/nexus/content/repositories/snapshots/

 

If you receive authorization errors during deployment, it probably means that your settings.xml is not configured with the correct server configuration.

 

 

  <servers>
    ...
    <server>
      <id>jboss-snapshots-repository</id>
      <username>JBoss.org username</username>
      <password>JBoss.org password</password>
    </server>
    ...
  </servers>

 

HTTP 401 Unauthorized

If you get an HTTP 401 error, it means that Nexus is not accepting your user credentials.  Here are the steps to follow.

 

1. Check that you can log in to Nexus using your jboss.org username and password.

    https://repository.jboss.org/nexus/index.html

 

    If you can't log in, submit a jboss.org request to get access (https://issues.jboss.org/browse/ORG) or a helpdesk ticket for redhat employees.

 

2. Check that the correct username and password is set in your maven settings.xml

 

3. Check that the snapshot repository <id> field in the POM matches the server <id> field in your settings.xml

 

 

 

 

.