Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Maven

Revision as of 07:43, 19 March 2011 by Unnamed Poltroon (Talk) (Proposal)

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

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

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 storing final releases, e.g. Helios 3.6, 3.6.1, 3.6.2
  • /milestone - for storing milestone releases (for the latest build only?) e.g. 3.7M1, 3.7M2
  • /integration - for storing -SNAPSHOT equivalents of integration (I) builds; to be purged frequently (weekly?)
  • /nightly - 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)?

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></snapshot>
    </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></snapshot>
        <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.

Related Bugs

  • bug 283745 - Provide a Maven repository for stuff built at Eclipse
  • bug 340416 - Resolving dependencies from Orbit

Back to the top