Can this be used to build an eclipse update site using Gradle?
I am new to eclipse and Gradle. I have a specific requirement to build an eclipse update site, that has an eclipse feature and feature contains an eclipse plugin. I was able to build the plugin using this plugin but got stuck building feature and update site. Do you have any example?
Unfortunately, I don't have an example that builds an update site containing a feature and update site.
This is the FeaturesAndBundlesPublisher gradle task, which is a wrapper around this eclipse application.
Feel free to reopen if you have further issues.
I have the same question, so I hope it is OK to resume this thread.
My hope is that it is possible to create a multi module gradle project that builds some bundles first, and then publish them as a regular Eclipse Feature and then as an Update Site.
I am not sure to understand how the app FeaturesAndBundlesPublisher needs to be configured inside the Gradle build.
I am probably influenced by the way tycho is working, but I was expecting to provide a feature.xml file (or the project containing the file) for feature and/or then a site.xml (or the project containing this file) for a P2 update site.
Then I was wondering how the jars and source-jars are retrieved from the Gradle Build. Should I publish them somewhere first ?
Thank you in advance for your help.
Happy to reopen it, but I don't have any more to offer besides the two links above. The second link, about the eclipse application which gets called, is particularly relevant.
Thank you for the fast answer.
Eventually I will dig into the code of the "UpdateSite Publisher Application" to understand what it is doing. From what I found in the wiki and in different blog posts (here or here), the usage of the FeaturesAndBundlesPublisher stays a mystery to me.
Meanwhile I have worked on a PoC where the gradle build publishes to a local maven repository ./gradlew publish. And then a tycho build using the <pomDependencies>consider</pomDependencies> feature is picking up the jars from this repository to build the feature and the update-site.
I will share the code of this PoC as soon possible (I need to clean it up first). I would prefer a solution where only Gradle is used.
Fwiw, at DiffPlug we have fully abandoned p2 and the RCP bundling process. We use the eclipse artifacts using com.diffplug.eclipse.mavencentral, and we ship using https://github.com/libgdx/packr. At some point I'm going to take the "Equo Framework" for a spin to see if it is useful.
Happy to host discussions and merge PRs which solve problems for people who are getting value from p2 and the RCP bundling process.
If you don't have to use it, probably it is a good idea to not use p2 at all… But in my case (Eclipse Plugin) I need to create an update site…
Here is the prototype that mixes bundles built with Gradle and Tycho: https://github.com/jmini/tycho-experiments/tree/master/gradle-and-tycho
At some point I have really good hope to drop the Tycho part, because I have the feeling Tycho is just calling some PDE applications such as FeaturesAndBundlesPublisher…
Example we see in the logs during the build of the Update Site (usage of an application called org.eclipse.equinox.p2.publisher.UpdateSitePublisher):
[INFO] --- tycho-p2-plugin:2.3.0:update-site-p2-metadata (default-update-site-p2-metadata) @ updatesite.fr.jmini.eclipse ---
[INFO] Command line:
[~/.sdkman/candidates/java/11.0.5.hs-adpt/bin/java, -jar, ~/.m2/repository/org/eclipse/tycho/tycho-bundles-external/2.3.0/eclipse/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar, -configuration, /var/folders/d9/hsnvfz416qz37w3_v1kpj5pw0000gn/T/tycho-p2-runtime8957235273686211902.tmp/configuration, -nosplash, -application, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, -source, ~/Git/tycho-experiments/gradle-and-tycho/updatesite.fr.jmini.eclipse/target/site, -metadataRepository, file:~/Git/tycho-experiments/gradle-and-tycho/updatesite.fr.jmini.eclipse/target/site/, -metadataRepositoryName, updatesite.fr.jmini.eclipse, -artifactRepository, file:~/Git/tycho-experiments/gradle-and-tycho/updatesite.fr.jmini.eclipse/target/site/, -artifactRepositoryName, updatesite.fr.jmini.eclipse Artifacts, -noDefaultIUs, -compress]
Generating metadata for ..
Generation completed with success [0 seconds].
This looks promising.
For the build of the feature jar, I could not spot a similar line. But I imagine Tycho is also reusing some Eclipse components.
@jmini do you have any updates? Were you able to drop tycho and only use gradle?
@feeex not yet, sorry…
I am new to eclipse and Gradle. I have a specific requirement to build an eclipse update site, that has an eclipse feature and feature contains an eclipse plugin. I was able to build the plugin using this plugin but got stuck building feature and update site. Do you have any example?
Hey @beginnerbegin Could you please tell me the process to build the plugins with gradle
This is not going to get implemented as part of Goomph. If there's enough interest it could be done as part of EquoIDE.
- https://github.com/equodev/equo-ide/tree/main/plugin-gradle#user-plugins