Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Maven"

(Added related bugs)
(Proposal)
Line 8: Line 8:
  
 
* <code>/orbit</code> - for holding Orbit approved external dependencies
 
* <code>/orbit</code> - for holding Orbit approved external dependencies
* <code>/central</code> - for aggregating:
 
** <code>/repo1</code> - mirror of http://repo1.maven.org
 
** <code>/repo2</code> - mirror of http://repo1.maven.org
 
 
* <code>/release</code> - for storing final releases, e.g. Helios 3.6, 3.6.1, 3.6.2
 
* <code>/release</code> - for storing final releases, e.g. Helios 3.6, 3.6.1, 3.6.2
 
* <code>/milestone</code> - for storing milestone releases (for the latest build only?) e.g. 3.7M1, 3.7M2
 
* <code>/milestone</code> - for storing milestone releases (for the latest build only?) e.g. 3.7M1, 3.7M2
* <code>/integration</code> - for storing -SNAPSHOT equivalents of integration (I) builds
+
* <code>/integration</code> - for storing -SNAPSHOT equivalents of integration (I) builds; to be purged frequently (weekly?)
* <code>/nightly</code> - for storing -SNAPSHOT equivalents of nightly (N) builds
+
* <code>/nightly</code> - 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.
 
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:
 +
 +
* <code>/testing</code> - 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.
 +
 +
* <code>/central</code> - for aggregating:
 +
** <code>/repo1</code> - mirror of http://repo1.maven.org
 +
** <code>/repo2</code> - mirror of http://repo1.maven.org
 +
* <code>/codehaus-snapshots</code> - mirror of http://snapshots.repository.codehaus.org/ - may be needed for findbugs for tycho builds
 +
* <code>/codehaus</code> - mirror of http://repository.codehaus.org/
 +
* <code>/sonatype</code> - mirror of ?
  
 
== Repositories ==
 
== Repositories ==

Revision as of 07:35, 19 March 2011

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.

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/central</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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.