Maven - Central Repository

> Maven

1 - About

The Central repository is the the default repository for Apache Maven but also for other build system such SBT.

This is hosted on a nexus repository manager server.

Advertising

3 - Management

http://search.maven.org/ Search the central repository

3.2 - Deployment

3.2.1 - Requirement

3.2.1.1 - pom.xml

from http://central.sonatype.org/pages/requirements.html The pom.xml file must have the following:

  • a version that can be an arbitrary string and can not end in -SNAPSHOT.
  • a name. For instance:
<name>${project.groupId}:${project.artifactId}</name>
  • a description
  • a url
  • the license
<licenses>
  <license>
    <name>The Apache License, Version 2.0</name>
    <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
  </license>
</licenses>
  • Developer info:
<developers>
    <developer>
      <name>Nicolas GERARD</name>
      <email>[email protected]</email>
      <organization>Gerardnico</organization>
      <organizationUrl>https://gerardnico.com</organizationUrl>
    </developer>
  </developers>
  • Scm
<scm>
  <connection>scm:git:git://github.com/simpligility/ossrh-demo.git</connection>
  <developerConnection>scm:git:ssh://github.com:simpligility/ossrh-demo.git</developerConnection>
  <url>http://github.com/simpligility/ossrh-demo/tree/master</url>
</scm>

The artifacts that must be delivered are:

example-application.pom
  • The Library archive:
example-application.jar
  • The sources:
example-application-1.4.7-sources.jar
example-application-1.4.7-javadoc.jar

All files deployed need to be signed with GPG/PGP and a .asc file containing the signature must be included for each file. Ie this files need to be included.

example-application-1.4.7.pom.asc
example-application-1.4.7.jar.asc
example-application-1.4.7-sources.jar.asc
example-application-1.4.7-javadoc.jar.asc
Advertising

3.3 - Stats

Statistics about the size of the Central Repository are available at http://search.maven.org/#stats

4 - After Registration

Configuration has been prepared, now you can:

5 - Documentation / Reference