|
Re: Complete versioning support of target / targlet with OOMPH ? [message #1797681 is a reply to message #1797662] |
Mon, 05 November 2018 00:50   |
Eclipse User |
|
|
|
You'd need to version the setup itself. Typically the Project setup is maintained in the same Git clone as the projects that it sets up. It would be referenced via a plain text link to the master branch version in that repository. E.g.,
http://git.eclipse.org/c/emf/org.eclipse.emf.git/plain/releng/org.eclipse.emf.releng/EMF.setup
The Project setup can then contain a task like this:<?xml version="1.0" encoding="UTF-8"?>
<setup:EclipseIniTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
option="-Doomph.redirection.emf.setup"
value="=http://git.eclipse.org/c/emf/org.eclipse.emf.git/plain/releng/org.eclipse.emf.releng/EMF.setup->${emf.git.clone.location|uri}/releng/org.eclipse.emf.releng/EMF.setup"
vm="true"/>
I.e., it will generate a -Doomph.redirection.* system property in the eclipse.ini of the installation. The * is arbitrary but of course should be unique if there are other project setups involved. This causes the URI to be redirected to the version in the local clone, once the clone is in place. So the installation uses the local cloned version of the setup, and you can change it and test it locally before committing changes to it. The setup itself is then versioned in the clone, so if you check out an older commit in the clone, the IDE would see that older version of the setup, so you could Perform the Targlet Task again to resolve dependencies in the older way.
The tricky part is if accessing the plain text link to the setup in the Git repository web view requires authentication. As of the most recent release of Oomph, there is support for cookie-based authentication as used by Github/Gitlab-type hosts. E.g, you can use a URI of this form:
https://github.com/<user>/<repo>/raw/master/<path>/<Project>.setup?oomph_form=b'login'
Such a URI is processed by org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.Main.transform(URI, Map<Object, Object>) which forces the URI handling logic to visit https://github.com/login first where it finds and downloads an HTTP form. Oomph will then prompt for the user name and password to submit that form, acquiring the cookie it needs to access the original URI so that it can download the actual Project setup.
Note that the process of creating an installation can be made easier by using a Configuration. E.g, see the instructions on this page:
https://ci.eclipse.org/emf/
Then the user only needs to drag and drop(apply) the Configuration on/to the installer. The Configuration itself need not be versioned; it is used only as a template to initialize the installer pages (and the Installation and Workspace setups it uses). The Configuration processing can automatically add the Project setup to the User extension of the Project Catalog in which the setup is logically contained.
|
|
|
Re: Complete versioning support of target / targlet with OOMPH ? [message #1821052 is a reply to message #1797681] |
Tue, 04 February 2020 15:52  |
Eclipse User |
|
|
|
Hey Ed,
I just came across this post as I logged in for another issue.
We thought we had a problem with cookie-based authentication at first - the installer came to a state where it crashed reproducibly and in the end, we switched to unathenticated access.
Meanwhile I think the root of the problem was the incapability of Eclipse to store different HTTPS credentials for different paths of the same host name, so I guess it wasn't a problem with the installer.
The redirection of the setup file works really smoothly by the way. I hope you accept my slightly late thank you :-)
Best regards
Rice
|
|
|
Powered by
FUDForum. Page generated in 0.03882 seconds