Nexus Guide

Setup Staging (Admin)

Staging is necessary to ensure that deployed artifacts are acceptable for central synchronization.

Administrator must respect the name conventions when setting up staging.

Repository target

An administrator has to create a new Repository Target (click on the 'Add' green button).
This acts as a filter to detect when an artifact is uploaded to which project it belongs.
In our case, the pattern reflects the main groupId of the project (should be of the form 'org.ow2.<project>').

Example:

  • Name : OW2 Chameleon (Maven2)
    • (OW2 <Project Name With Appropriate Camelcase>)
  • Repository Type : maven2
  • Pattern Expression : .*/org/ow2/chameleon/.*

Screenshot:
repository-target.png

Staging Profile

A Staging Profile is the central configuration point of staging repositories.
It mainly answers theses questions:

  • In which hosted repository the artifacts will finally be placed ?
  • Will the profile accept deploy (from maven) and/or upload (from UI) artifacts ?
  • What are the rules to be checked on the artifacts before promoting the repository ?

Click on the 'Add' green button and select *Staging Profile*.

Example:

  • Profile Name : OW2 Chameleon
    • (OW2 <Project Name With Appropriate Camelcase>)
  • Staging Mode : Deploy
  • Template : Maven2
  • Repository Target : OW2 Chameleon (Maven2)
  • Release Repository : Releases
  • Target Groups : Public Repositories
  • Close Repository Staging RuleSet : Closing RuleSet
Configure the notifications accordingly to the project's convenience.

Screenshot:
staging-profile.png

LDAP Role

Nexus can map a role on an LDAP group.
This is particularily handy when we want to define a role for all the committers of a project (each GForge project having a unique LDAP group).
Then it will be possible to gives additionnal permissions/roles to this new role.

Open the Roles page (in the Security section on the left).
Click on the 'Add' green button and select External Role Mapping.
The specified ID must be the name of the LDAP role (usually the GForge project's unix ID).

Example:

  • Role Id : chameleon
  • Name : OW2 Chameleon (chameleon)
    • (OW2 <Project Name With Appropriate Camelcase> (<unix project name>))
  • Description : External mapping for chameleon (LDAP)

Additional Roles

If left 'as is', the new role cannot do anything interesting, extra roles have to be assigned:

  • Nexus Developer role
  • OW2 Upload to Snapshot Role
  • Staging: deployer (OW2 Chameleon)
  • UI: Staging Repositories
  • Repo: All Repositories (Read)
  • Staging: Profile OW2 Chameleon (promote)

Screenshot:
roles.png

First Release (Devs)

Before performing the first project's release on Nexus, a couple of changes need to be done.

Versions

Maven

Releases Managers can only releases using a Maven v2.2.x or Maven 3.x (due to some PGP signatures issues).

Plugins

Changing Parent's POM

Any released module must inherit (directly or indirectly) from the OW2 organizational POM (GAV : org.ow:ow2).

At the time of writing, the latest version of this POM is 1.3.
<project xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                             http://maven.apache.org/maven-v4_0_0.xsd"
>

 <parent>
   <artifactId>ow2</artifactId>
   <groupId>org.ow2</groupId>
   <version>1.3</version>
 </parent>

 <!-- ... -->

</project>

PGP Key

All released artifacts must be signed with a GPG key.

Release Managers must read the Maven/GPG documentation. They should not forget to distribute their public key to key servers.

POM Rules

Theses rules applies to the parent POM of the staged artifacts (for a multi-module project).

General

Project POM must have the following elements:

  • <modelVersion>
  • <groupId>
  • <artifactId>
  • <version>
  • <packaging>
  • <name>
  • <description>
  • <url>
  • <licenses>
  • <scm><url>
  • <scm><connection>
  • <developers>

No Releases Repositories

GSA: I'm not sure this check only applies to the parent POM...

Tips

  • wagon-ssh in build/extensions is not required anymore (except for thoses producing a maven site with scp).
  • Use the ow2-release release profile if you want to add specific release behavior
  • Update your /.m2/settings.xml to use <password> instead of (or in addition to) <privateKey> for the ow2.releases and ow2.snapshots servers.

References

Tags:
Created by Guillaume Sauthier on 2011/04/21 14:39
http://skins.ow2.org/skins/skinOW2/images/Featuredvideo.png
  • Thierry Souche, Orange
http://skins.ow2.org/skins/skinOW2/images/watchallvideos.png

Powered by XWiki Hosted by Xsalto Free PageRank Checker Creative Commons 2.0 license Legal Notice