Jump to: navigation, search

Difference between revisions of "RAP/Maven Central"

< RAP
Line 45: Line 45:
 
     -DpomFile=${id}_${version}.pom -Dfile=${id}.source_${version}.jar -Dclassifier=sources  
 
     -DpomFile=${id}_${version}.pom -Dfile=${id}.source_${version}.jar -Dclassifier=sources  
 
  done
 
  done
 +
 +
echo "Done. Now go to https://oss.sonatype.org/ -> Staging Repositories, and close the new repository."
  
 
[[Category:RAP]]
 
[[Category:RAP]]

Revision as of 05:38, 12 July 2012

Contributing RAP Bundles to Maven Central Repository

The Sonatype OSSRH (OSS Repository Hosting Service) provides a Maven repository hosting service for open source projects and can be used to distribute artifacts to the Maven Central Repository. This guide explains the steps to do so.

The person who uploads bundles has to have a Sonatype user account.

A configuration for org.eclipse.rap has already been created, see OSSRH-3818, so there is no need to open a JIRA ticket anymore, unless to request publish rights for additional committers.

Signing

Jars have to be signed using PGP, this is different from the jarsigner signatures by Eclipse. Thus, the person who signs and uploads the bundles has to create a PGP key. This process is explained in this tutorial.

The userid and passord has to be in the Maven settings.xml file as described in the guide mentioned above. See also the Maven settings reference.

Which bundles?

For RAP 1.5, we upload these three bundles:

  • org.eclipse.rap.rwt
  • org.eclipse.rap.rwt.osgi
  • org.eclipse.rap.jface

Preparation

  • Copy the release versions of the bundles, including source bundles.
  • Create a POM file for every bundle (not for the source bundles). The pom files should have the same name as the jar file, but with the extension .pom instead of .jar.

Signing and uploading

The following shell script can be used for uploading:

#!/bin/bash

URL=https://oss.sonatype.org/service/local/staging/deploy/maven2/
REPO=sonatype-nexus-staging

version=1.5.0.20120612-1458

for id in org.eclipse.rap.rwt org.eclipse.rap.rwt.osgi org.eclipse.rap.jface; do
  mvn gpg:sign-and-deploy-file -Durl=${URL} -DrepositoryId=${REPO} \
    -DpomFile=${id}_${version}.pom -Dfile=${id}_${version}.jar 
  mvn gpg:sign-and-deploy-file -Durl=${URL} -DrepositoryId=${REPO} \
    -DpomFile=${id}_${version}.pom -Dfile=${id}.source_${version}.jar -Dclassifier=sources 
done

echo "Done. Now go to https://oss.sonatype.org/ -> Staging Repositories, and close the new repository."