Jump to: navigation, search

Difference between revisions of "Maven Tools 4 Eclipse"

(Updated for new Groovy version)
(How do I import the result in a Nexus server?)
Line 34: Line 34:
 
# Check the HTML file which was created for any issues that you might care about.
 
# Check the HTML file which was created for any issues that you might care about.
 
# Upload the content of <tt>org.eclipse.dash.m4e.tools/tmp/m2repo/</tt> somewhere where Maven can find it (<tt>~/.m2/repository/</tt> or your Maven proxy).
 
# Upload the content of <tt>org.eclipse.dash.m4e.tools/tmp/m2repo/</tt> somewhere where Maven can find it (<tt>~/.m2/repository/</tt> or your Maven proxy).
 +
 +
== How do I import the result in a Nexus server? ==
 +
 +
It's very tedious to deploy the files one by one. Here is a recipe to mass-upload them:
 +
 +
# Create a "Hosted Repository" on Nexus
 +
# Copy the files from <tt>tmp/m2repo/</tt> into <tt>sonatype-work/nexus/storage/<name>/</tt> where <tt><name></tt> is the name of the new repository.
 +
# Open the Nexus UI in your web browser
 +
# Login as admin
 +
# Open the "Repositories" tab
 +
# Right click on the hosted repository
 +
# Select "Rebuild Metadata"
 +
 +
After that, Maven should be happy.
  
 
== Support ==
 
== Support ==

Revision as of 11:33, 17 August 2011

Maven Tools 4 Eclipse (or m4e for short) is a set of tools to convert OSGi bundles into Maven artifacts.

You can find the source on http://git.eclipse.org/c/dash/org.eclipse.dash.m4e.tools.git/

This tool is used to create the Maven artifacts which you can find on Eclipse's Nexus server at http://maven.eclipse.org/nexus/index.html

How it works

A simple workflow:

  1. Download an Eclipse release from http://www.eclipse.org/downloads/
  2. Import it into a temporary Maven repo using ./run.sh import archive
  3. Download the sources for the Eclipse release and/or other archives which contain Eclipse products or OSGi bundles.
  4. Import them as well
  5. Merge all repositories using ./run.sh merge
  6. The sources are in the wrong place. Fix that with ./run.sh attach-sources

TODO These commands are not yet available with the Groovy version

  1. Fix any know problems by applying the patches in the patches/ folder using the tool ./run.sh apply-patches
  2. Check the result with ./run.sh analyze
  3. Create a POM with the version info to make sure your build picks the correct versions using the ./run.sh dm tool
  4. If anything goes wrong, use ./run.sh clean to clean up temporary files and start over.

How you should use it

TODO These commands are not yet available with the Groovy version Overwhelmed? Here is a more simple version:

  1. git clone git://git.eclipse.org/gitroot/dash/org.eclipse.dash.m4e.tools.git
  2. Download everything you will want and put it into the folder org.eclipse.dash.m4e.tools/downloads/
  3. run ./run.sh convert Yes, you need Linux or MacOS for that.
  4. Grab some coffee. Not more than 12 cups per day, okay?
  5. Check the HTML file which was created for any issues that you might care about.
  6. Upload the content of org.eclipse.dash.m4e.tools/tmp/m2repo/ somewhere where Maven can find it (~/.m2/repository/ or your Maven proxy).

How do I import the result in a Nexus server?

It's very tedious to deploy the files one by one. Here is a recipe to mass-upload them:

  1. Create a "Hosted Repository" on Nexus
  2. Copy the files from tmp/m2repo/ into sonatype-work/nexus/storage/<name>/ where <name> is the name of the new repository.
  3. Open the Nexus UI in your web browser
  4. Login as admin
  5. Open the "Repositories" tab
  6. Right click on the hosted repository
  7. Select "Rebuild Metadata"

After that, Maven should be happy.

Support

Please file an issue for Project Dash, Component Maven.

Biggest Issues Right Now

  1. The name m4e sucks. Suggestions?
  2. Find the time to create a repo with Eclipse 3.7

Old Python Version

You can find the original Python project on Github: https://github.com/digulla/org.eclipse.dash.m4e.tools/

It needs Python 2.7 and lxml.