Skip to main content
Jump to: navigation, search

Difference between revisions of "Maven"

m (Repositories)
Line 55: Line 55:
 
       <layout>maven2</layout>
 
       <layout>maven2</layout>
 
       <url>http://maven.eclipse.org/orbit</url>
 
       <url>http://maven.eclipse.org/orbit</url>
       <snapshots><enabled>false</enabled></snapshot>
+
       <snapshots><enabled>false</enabled></snapshots>
 
     </repository>
 
     </repository>
 
   </repositories>
 
   </repositories>
Line 64: Line 64:
 
         <layout>maven2</layout>
 
         <layout>maven2</layout>
 
         <url>http://maven.eclipse.org/build</url>
 
         <url>http://maven.eclipse.org/build</url>
         <snapshots><enabled>false</enabled></snapshot>
+
         <snapshots><enabled>false</enabled></snapshots>
 
         <releases><updatePolicy>never</updatePolicy></releases>   
 
         <releases><updatePolicy>never</updatePolicy></releases>   
 
     </pluginRepository>
 
     </pluginRepository>

Revision as of 09:20, 2 September 2013

  • Note: maven.eclipse.org is planned for decommission per Bug 405750, repo.eclipse.org is replacing maven.eclipse.org; details on the new service can be found at Services/Nexus.

A prototype of Maven repository support at Eclipse is undergoing creation.

The site currently runs Nexus and is available at http://maven.eclipse.org/nexus/

Discussion regarding this repository occurs in the dash-dev mailing list.

Proposal

Nexus is capable of segregating and aggregating individual repositories. To facilitate the management of artefacts hosted, it is proposed that the Nexus repository is configured with a number of subsidiary repositories which will hold different content, as follows:

  • /orbit - for holding Orbit approved external dependencies
  • /release - for aggregating
    • /release/ganymede - for storing final releases, e.g. Ganymede 3.5, 3.5.1, 3.5.2
    • /release/helios - for storing final releases, e.g. Helios 3.6, 3.6.1, 3.6.2
  • /milestone - for aggregating
    • /milestone/juno - for storing milestone releases (for Helios+1) e.g. 3.7M1, 3.7M2
  • /integration - for aggregating
    • /integration/juno - for storing -SNAPSHOT equivalents of integration (I) builds; to be purged frequently (weekly?)
  • /nightly - for aggregating
    • /nightly/juno - for storing -SNAPSHOT equivalents of nightly (N) builds; to be purged frequently (nightly?)

It is proposed that the release entries are permanently available, whilst milestones may be cleared out after the final release, and nightly and integration builds are cleared out automatically.

In addition, for testing:

  • /testing - for storing -SNAPSHOT equivalents for testing purposes; to be purged occasionally (monthly?)

To support automated builds at Eclipse, it may make sense to proxy publicly available repositories, although these should not be publicly available.

To make it easy to consume these for plugins, it may make sense to have a general name which aggregates all for these (e.g. /build)?

GAVs

For any JAR, org.eclipse.a.b.c, the groupId will be org.eclipse.a and the artifactId will be org.eclipse.a.b.c.

Versions will only use the major.minor.micro format. Build/quantifiers will be dropped. For releases and milestones, these should only be published after the official components have been created and so build IDs will not be an issue. For nightly/snapshot releases, the designator -SNAPSHOT will be used.

Repositories

In order to build against known good sources, the 'repositories' should be configured such that they only consume from /central for acquisition of Maven plugins, and not to satisfy build dependencies. In other words, something like:

  <repositories>
    <repository>
      <id>orbit</id>
      <name>Orbit approved dependency repository</name>
      <layout>maven2</layout>
      <url>http://maven.eclipse.org/orbit</url>
      <snapshots><enabled>false</enabled></snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
        <id>central</id>
        <name>Maven central</name>
        <layout>maven2</layout>
        <url>http://maven.eclipse.org/build</url>
        <snapshots><enabled>false</enabled></snapshots>
        <releases><updatePolicy>never</updatePolicy></releases>  
    </pluginRepository>
  </pluginRepositories>

This will enable plugin dependencies (e.g. Tycho) to be resolved whilst not allowing project dependencies to consume other than from the Orbit pre-approved repository.

Profiles

To allow different repositories to be switched between, we could use the profile mechanism in Maven to allow other repositories to be brought in:

  <profiles>
    <profile>
      <id>milestone</id>
      <activation><activeByDefault>false</activeByDefault></activation>
      <repositories>
        <repository>
          <id>milestone</id>
          <name>Milestone releases</name>
          <url>http://maven.eclipse.org/milestone</url>
          <snapshots><enabled>false</enabled></snapshots>
        </repository>
      </repositories>  
    </profile>
    <profile>
      <id>integration</id>
      <activation><activeByDefault>false</activeByDefault></activation>
      <repositories>
        <repository>
          <id>integration</id>
          <name>Integration releases</name>
          <url>http://maven.eclipse.org/integration</url>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>  
    </profile>
    <profile>
      <id>nightly</id>
      <activation><activeByDefault>false</activeByDefault></activation>
      <repositories>
        <repository>
          <id>nightly</id>
          <name>Nightly releases</name>
          <url>http://maven.eclipse.org/nightly</url>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>  
    </profile>
  </profiles>

This will allow compilation against a milestone, integration or nightly branch set of dependencies with e.g. maven -P nightly.

Open issues

Related Bugs

Back to the top