diffplug / goomph

IDE as build artifact
Apache License 2.0
130 stars 30 forks source link

Expand `eclipse.mavencentral` to more than just JDT and PDE #178

Closed philip-iii closed 1 year ago

philip-iii commented 2 years ago

Hey folks, I was trying to get the UML2/Modelling components (e.g. org.eclipse.uml2.uml) as a dependency with the eclipseMavenCentral task, but it fails to find any of the bundles and lists all the bundles it could find (which is a surprisingly short list). Looking at the root URL provides a hint why that might be:

https://github.com/diffplug/goomph/blob/297137026f8e155da220047c2c9e3e44368fac87/src/main/java/com/diffplug/gradle/pde/EclipseRelease.java#L77

The line linked above indicates the The Eclipse Project Updates URL - e.g. https://download.eclipse.org/eclipse/updates/4.22 (the release is appended depending on the parameter). When I search for UML using that link in Eclipse it shows no results. Instead, when using the corresponding releases URL - e.g. for 2021-12 - https://download.eclipse.org/releases/2021-12/, it does show the results as expected.

Is there any reason why the /eclipse/updates URL is used instead of the /releases one? I guess one minor issue is the need to translate between the release number and the release name, or simply specify the release name instead, but that should be easy to fix.

philip-iii commented 2 years ago

I did try to change it, also adding the suffix, e.g. https://download.eclipse.org/releases/2021-12/202112081000/, but it does not work. It seems that only the predefined groups in the MavenCentralMapping class are supported https://github.com/diffplug/goomph/blob/9f5523b2b1e9b295d7e4aa41461e63183b0cbdde/src/main/java/com/diffplug/gradle/eclipse/MavenCentralMapping.java#L44 which is rather limited, but I guess sufficient for the original intention.

nedtwigg commented 2 years ago

Happy to take a PR which supports a broader scope. The URL scheme we are using right now goes all the way back to 3.5.0, way before the switch to dated releases every 3 months.

https://github.com/diffplug/goomph/blob/f33385480abe53b1b42713693efe1b8ff44ce1b6/src/main/java/com/diffplug/gradle/pde/EclipseRelease.java#L79

I'd be happy to merge a PR which does something along these lines:

JDT and Platform are all that we need, but we're happy to aggregate whatever features the community wants to write PRs for.

philip-iii commented 2 years ago

Thanks for the hints! I did have another look, but I think the problem runs deeper - the UML2 artefacts on the Apache repository / MavenCentral are fairly outdated (e.g. https://repo.maven.apache.org/maven2/org/eclipse/uml2/) and compatibility can be a challenge with other related components (Ecore / EMF). So I guess in order to get the actual components shipped with the release, we will have to resort to the asmaven plugin (which on its own seems to require Java 8?).

nedtwigg commented 2 years ago

Yeah, the Eclipse project doesn't publish everything to mavencentral, but I really wish they did. Yep, you can use the asmaven plugin to get stuff from p2 repos, but you will need to run the Gradle build under Java 8.

nedtwigg commented 1 year ago

There's a new plugin dev.equo.p2deps which can handle any p2 update site, and smoothly uses maven artifacts whenever they are specified. It works on any p2 update site and it's way faster than the plugin in Goomph, I highly recommend giving it a shot.