If you work with eclipse, then you know all about p2. It’s an ambitious piece of software with broad scope, and it gives the eclipse ecosystem several unique features (bundle pools!). The downside of its ambition and scope is its complexity - it can be daunting for newcomers to use. Based on google search traffic, let’s see how many people are searching the term p2 repository
:
It looks like, for now, p2 has reached its full audience. To put the y-axis into perspective, let’s compare the number of people searching for p2 repository
with the number of people searching for maven repository
.
This tells us two things:
- If you publish software in a p2 repository, most of the java world doesn’t know how to get it.
- Unless some event happens, that’s not going to change - the trends, such as they exist currently, are not in p2’s favor.
The tragedy of this is that the eclipse ecosystem has lots of valuable bits to offer the broader community, and the broader community has lots of valuable contributions that aren’t happening because they just can’t get our stuff in the first place.
If we were looking for a strategy to get eclipse and p2 into the hands of more users and potential contributors, where could we go?
There are still way more Maven users than Gradle users - the p2 and maven results are reduced by having “repository” on the end. But Gradle is on a monstrous growth trajectory, and it already sees millions of downloads per month.
So, in an attempt to put Eclipse, p2, and its associated ecosystem onto the Gradle rocketship, I’m proud to present Goomph. Goomph is a gradle plugin which can do two things:
- Put a little snippet inside your
build.gradle
file, and it will provision your IDE as a disposable build artifact, using techniques stolen from Oomph.
apply plugin: 'com.diffplug.gradle.oomph.ide'
oomphIde {
repoEclipseLatest()
jdt {}
eclipseIni {
vmargs('-Xmx2g') // IDE can have up to 2 gigs of RAM
}
style {
classicTheme() // oldschool cool
niceText() // with nice fonts and visible whitespace
}
}
- It can download artifacts from a
p2
repository, run PDE build, run eclipse ant tasks, and all kinds of eclipse build system miscellany.
If you’re curious about these claims, you can quickly find out more by cloning the Gradle and Eclipse RCP demo project. Run gradlew ide
and you’ll have a working IDE with a targetplatform ready to go. Run gradlew assemble.all
and you’ll have native launchers for win/mac/linux.
If you’d like to know more about Gradle and p2, here’s a youtube video of a talk I presented at Gradle Summit 2016.
Future blog posts will dive deeper into these topics. If you’d like to be notified, you can follow its development on any of these channels: