13. May, 2011
I’ve finished RC1 of my set of tools to import Eclipse plug-ins into Maven 2 repositories. You can find the source on github. It needs Python 2.7 and lxml. pip is your friend.
The new features: There is now a tool to analyze the M2 repository for oddities. Currently, it can find these issues:
- Dependencies which are used but not part of the repository
- Dependencies which are used with different versions or version ranges (i.e. when one POM includes a dependency with 1.0 and another POM pulls in the very same dependency with version 1.1)
- Dependencies which are used without versions or version ranges or a catch-all version like [0,)
- Several versions of the same artifact in the repository
Plus it prints a list of all POMs in the repo with files (jar, pom, sources, test-sources, …). Here is a sample report.
The last tool can create a POM file with a dependencyManagement element containing the versions of the POMs in the repository. You can use this to nail down all versions to the ones existing in your repository (so you don’t accidentally pull in something you don’t want).
Lastly, I’ve enhanced the patch tool. Instead of overwriting replaced dependencies, it will now move them into a new profile. This way, users of the repository can specify which dependency they want (the one from the repository or, say, one from Maven Central).
I will try to build a new testing repo over the weekend so we can start wrapping up the necessary patches for a release.
Related posts: Eclipse 3.6.2 Artifacts for Maven 2
2 Comments | Software | Tagged: Apache Maven, Eclipse, Java, plug-ins, Project Dash, Python | Permalink
Posted by digulla
16. March, 2011
Dave Orme wrote a really interesting article about building blocks of a RCP application with OSGi: The OSGi Building Block Pattern: An Invitation
I agree with him: The RCP wizard should really create projects to build a p2 repo and to package the bundles and features into something that a user can download and install.
Right now one of the major stumbling blocks when starting with Eclipse projects is that they either don’t build at all or that I fail to bundle/package them into some “output.”
The typical situation is that I’ve managed to import the project into my workspace. Now I get a lot of compile errors because bundles are missing in my IDE. Problem: I see the names but I have no idea at all where to download them. (See bug 340014 – “Offer a quick fix to install missing dependencies from p2 repositories”)
After manually googling for bundle names, trying to find the p2 repo which might contain them (in former times, p2 repositories offered a way to quickly browse them with a web browser – that doesn’t work anymore, so it’s poking in the dark). After a couple of restarts, the compile errors are gone.
At long last, I can start to fix my problem.
But now what? How can I create the “thing” that I need? (where “thing” can be a RCP app, a p2 repo, a bundle, a feature). Eclipse doesn’t allow to save the final after-build-step anywhere. Users must remember the steps: Export…, select the correct tool out 500, fill out the 100+ options in the little dialogs that pop up, rinse, repeat.
Welcome bug 340018 – “Allow to save export actions in a “launch” config”
Leave a Comment » | Software | Tagged: Eclipse, Java, OSGi, PDE, plug-ins, RCP | Permalink
Posted by digulla
15. November, 2010
After my horrible time with PDE, I have Tycho a whirl today. I must say the whole experience was much more pleasant (despite the unfriendly Tycho home page at tycho.sonatype.org – don’t go there!).
As before, I tried to build BIRT. Unfortunately, I failed (but much faster and I know why): Tycho 0.10.0 can’t resolve extra JAR dependencies: TYCHO-533 Tycho should honor jars.extra.classpath
If you want to get started with Tycho, visit this page. There is an exemplary POM and lots of other bits and pieces.
Leave a Comment » | Software | Tagged: Eclipse, Maven, mvn, p2, plug-ins, plugins, Tycho | Permalink
Posted by digulla