-
Notifications
You must be signed in to change notification settings - Fork 29
Convert Eclipse p2 tycho repositories to Maven Notes
From Issue #1, it would be nice to have JFace and SWTBot in this repository. However they have dependencies that must be resolved with something. A hacky bash script will work for now, but a more permanent solution is to use Eclipse's existing p2 system. Long term this might let us easily mirror other Eclipse projects
This page document's that attempt
##Notes
- p2/tycho is part of Eclipse's huge enterprise-y Equinox OSGi framework
- p2 is the type of repo?
- tycho is a maven plugin to generate bundle's and/or p2 repos
- SWT is actually a maven project! http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/pom.xml
Useful links
- SWT sources: http://www.eclipse.org/swt/git.php
- Map of packages to RCP plugin id's: http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Foverview-platform.html
Useful commands
- Mirror p2 repo locally
https://wiki.eclipse.org/Equinox_p2_Repository_Mirroring , http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.isv/guide/p2_mirror.html
./eclipse -nosplash -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source http://download.eclipse.org/technology/swtbot/snapshots/ -destination ../qp2-swtbot/
./eclipse -nosplash -verbose -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source http://download.eclipse.org/releases/mars/ -destination ../qp2-mars/
##Potential solutions
-
eclipse:to-maven
goal from https://maven.apache.org/plugins/maven-eclipse-plugin/to-maven-mojo.htmlRepackages all the bundles from a Eclipse installation/SDK folder into your local maven repository. Doesn't have a whole lot of configuration options
-
bnd
- http://bndtools.org/Its used for OSGi building from Maven, how does it get its dependencies? Are they stored in the user's m2 repo?
-
p2-scripts project: https://github.com/briandealwis/p2-scripts
Potentially useful p2 bash scripts
-
p2 ant tasks: http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm
Another view of their API
-
Write custom bash script to download, repackage, and generate pom's for all the dependencies and packages.
- Pros
- Can do this now without having to figure out how extract them from p2
- Doesn't sound too mentally difficult
- Cons
- Time consuming to do for every dependency for every existing supported release
- Time consuming to do for every new eclipse release, especially the dev-releases repository
- Most likely will be fragile as future p2/tycho versions could change their internal format
- Pros
-
Write custom Java CLI app that calls the p2, tycho, and Maven API's directly
- Pros
- Gives 100% control of the whole process with a lot less magic
- Cons
- Takes even more time to write against the internal Java API
- More complicated than a bash script
- The internal API might change more in the future than the external CLI api
- Pros
##Dead ends
-
https://github.com/reficio/p2-maven-plugin
N/A, used to depend on Eclipse RCP plugins from regular maven projects
-
Eclipse's official Nexus Maven Repository: https://repo.eclipse.org/
Only contains libraries for some projects (but not JFace, SWT, or SWTBot). Eg https://repo.eclipse.org/content/repositories/eclipse only has JDT and e4 JARs.