[UPDATE] There is now a testing repo which contains Eclipse 3.6.2
If you use Maven and Eclipse, you know the pain: How do I convert Eclipse plug-ins into Maven artifacts?
The simple step is to run mvn eclipse:make-artifacts
(or the ill fated eclipse:to-maven
).
But that’s only half of the work. A few of the plug-ins have bad dependencies (stuff isn’t declared optional, polluting your runtime classpath; versions of dependencies are missing). And a major problem is source attachments. Eclipse separates those from the binaries, so you end up with org.eclipse.core.runtime
and org.eclipse.core.runtime.sources
.
A few days ago, bug 337068 – “Please set up maven.eclipse.org” was fixed. The site exists and there is even a Nexus running on it.
Unfortunately, it’s a bit empty for now. We’re working on it 🙂
One of the first steps is a set of tools that takes downloads from eclipse.org and converts them into proper Maven artifacts – with source and all.
Welcome Project Dash m4e Tools. A preliminary version is available on github: https://github.com/digulla/org.eclipse.dash.m4e.tools
It consists of three tools so far:
- m4e-import can import downloads (archived or unpacked) into a temporary Maven 2 repository. Your own local repository (
${user.home}/.m2/repository
) is left untouched! - m4e-merge can merge several a temporary Maven 2 repositories into one.
- m4e-attach-sources tries to find all source bundles, moves+renames the source JAR to the right place and name and deletes the unnecessary folder.
Next step is a tool to patch the artifacts. One open issue is: How to handle dependencies which come from Project Orbit (bundling third party libraries for Eclipse projects).
Please visit Bug 340416 – “Resolving dependencies from Project Orbit” if you have an opinion.
[…] days ago, I told you about Project Dash and my new tools for it. Well, we did run them over the weekend and import a lot of stuff from Eclipse 3.6.2 into a […]
Will these “proper Maven artifacts” include a (portable) tycho build in the source?
Not yet. The first step is to get all Eclipse JARs into a Maven repository to allow to use them from Maven itself.
The next step is to provide some example POMs which Eclipse developers can copy to build Eclipse projects with Tycho.
Thanks,
Another quick question and I’ll let you get back to business 🙂
How will dependencies be expressed – in Maven terms or in Manifests or some mix? My understanding is that Tycho currently only supports Manifest-first, so I’m wondering if you’re trying to bridge that gap or if you’re just trying to allow non-osgi programs to consume bundles that don’t have a strict osgi dependencies.
Regards
Ron
My work just allows Maven builds to use OSGi bundles without the need to bring Tycho, p2, etc. into the picture.
Think of it as a set of scripts to fill Maven Central with anything you can download from eclipse.org.
[…] Project Dash m4e Tools – Create Maven Artifacts From Eclipse Plug-ins […]