Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Is it possible to restrict to a given version of eclipse?
Is it possible to restrict to a given version of eclipse? [message #1823148] Fri, 20 March 2020 11:08 Go to next message
Victor Toni is currently offline Victor ToniFriend
Messages: 20
Registered: July 2009
Junior Member
I would like to restrict our setup to a given version of eclipse. What would be the best way to do that?

Background to the question is that we use a plugin which has its own release cycle and sometimes there are compatibility issues between the latest eclipse release and the latest release of this plugin.
Usually this can be fixed by using snapshot verions of the plugin but these versions have their own quirks at times.

So the plan would be to avoid automatic updates and whenever there are supposed to be updates, these then can be tested on a small scale before impacting each and every developer.

[Updated on: Mon, 30 March 2020 13:39]

Report message to a moderator

Re: How to restrict to a given version of eclipse [message #1823153 is a reply to message #1823148] Fri, 20 March 2020 11:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
The short answer is that you can't. But you could provide a Configuration that combines the choice of Product Version with the choice(s) of Project Streams and the developers can make use of this instead:

https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Automation_and_Specialization_with_Configurations

There are some examples on this page:

https://www.eclipse.org/setups/installer/notification/

Specifically, each of these links show a nice page with information extracted from the Configuration itself and explains how to use the Configuration in the installer and even where to get the installer:

https://www.eclipse.org/setups/installer/?url=https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/configurations/OomphConfiguration.setup&show=true
https://www.eclipse.org/setups/installer/?url=https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/interim/PlatformSDKConfiguration.setup&show=true
https://www.eclipse.org/setups/installer/?url=https://git.eclipse.org/c/emf/org.eclipse.emf.git/plain/releng/org.eclipse.emf.releng/EMFDevelopmentEnvironmentConfiguration.setup&show=true&show=true

Oomph's and EMF's Configurations always use the latest Committers product version. The Platform SDK Configuration always uses Eclipse Platform Project's own latest SDK product version.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to restrict to a given version of eclipse [message #1823637 is a reply to message #1823153] Mon, 30 March 2020 14:39 Go to previous messageGo to next message
Victor Toni is currently offline Victor ToniFriend
Messages: 20
Registered: July 2009
Junior Member
Thanks a lot, Ed.

Using a product seems to be exactly what I want.
I created a product setup file with an unique ID and copied the 2019-12 version configuration (with a stricter version range "[4.14.0,4.15.0)") and gave it ID: "released.latest".
If I understood / guessed the IDs right if I would update the setup to version 2020-03 keeping the ID, this would update the requirements automatically.

This works nice, thanks.

There is one (nice-to-have) point open: right now I have two setup files:
one for the product and
one for the project.

Is it possible to merge them into one file?
Ideally I would have one file containing the product and the project definition. (for simplicity my project would still appear (as it's configured now ) under "org.eclipse" to reuse defaults ).
  <logicalProjectContainer
      xsi:type="setup:ProjectCatalog"
      href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>

I looked at the examples and they look more like including (but only for ProjectCatalog and Project):
https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/com.github.projects.setup
and I failed to find the XSD for " http://www.eclipse.org/oomph/setup/1.0" to find it out myself.
Re: How to restrict to a given version of eclipse [message #1823672 is a reply to message #1823637] Tue, 31 March 2020 05:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
Each schema URI in any *.setup always refers to an Ecore model not to XSD model, e.g., the nsURI of this:

https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.setup/model/Setup.ecore

You can't merge a Product and a Project into a single file because ultimately each such things needs to be contained by a Product Catalog or a Project Catalog and this involves EMF's cross resource containment support which only allows you to contain the root object of another resource. I suppose in principle it's possible to put the two objects in a single resource, but I don't know that this wouldn't cause problems somewhere.

And unfortunately Product Catalogs are not extensible the way the Project Catalogs are so adding your own Product setup is not so easy without -Doomph.redirection.* arguments to the installer itself...

Keep in mind that the Project setup can also include a p2 task where you can specify version ranges on the requirements as well as p2 repositories where to resolve them. So if you want to restrict version of the product, provide a Configuration to choose a specific Product Version, e.g., Product org.eclipse.platform.ide Version 2020-03.
<?xml version="1.0" encoding="UTF-8"?>
<setup.p2:P2Task
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
    label="Eclipse Platform (2020-03)">
  <requirement
      name="org.eclipse.platform.ide"
      versionRange="[4.15.0,5.0.0)"/>
  <requirement
      name="org.eclipse.platform.feature.group"
      versionRange="[4.15.0,5.0.0)"/>
  <requirement
      name="org.eclipse.rcp.feature.group"
      versionRange="[4.15.0,5.0.0)"/>
  <repository
      url="http://download.eclipse.org/releases/2020-03/202003181000">
    <annotation
        source="http://www.eclipse.org/oomph/setup/ReleaseTrain"/>
  </repository>
</setup.p2:P2Task>

This is just the bare bones. In your Project's setup can can include a p2 task to install whatever you want and only the things you want. If you later want the setup to update to a newer version of the platform, you can add a repository that contains the newer version. If you want to ensure that you don't randomly update to a higher version available in some p2 repository that you've added, the Project's p2 task can have a more restricted range on these same bare bones requirements above.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to restrict to a given version of eclipse [message #1823823 is a reply to message #1823153] Thu, 02 April 2020 14:58 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
Ed Merks wrote on Fri, 20 March 2020 11:53

Specifically, each of these links show a nice page with information extracted from the Configuration itself and explains how to use the Configuration in the installer and even where to get the installer:

https://www.eclipse.org/setups/installer/?url=https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/configurations/OomphConfiguration.setup&show=true


Does this work only for configurations hosted on eclipse.org or can I pass a github setup model to the url parameter?

Felix
Re: How to restrict to a given version of eclipse [message #1823827 is a reply to message #1823823] Thu, 02 April 2020 16:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
Only a Configuration can be processed from the command line, i.e., could be auto-launched, or could use the process described on that page. So it is only designed to work for only for a Configuration. A Configuration is trivial to create...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to restrict to a given version of eclipse [message #1823829 is a reply to message #1823827] Thu, 02 April 2020 16:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
It should work for any URL that hosts a Configuration, in case that wasn't clear...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to restrict to a given version of eclipse [message #1823830 is a reply to message #1823829] Thu, 02 April 2020 16:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 32111
Registered: July 2009
Senior Member
But I haven't actually tested. Who knows, maybe some cross-site loading restriction in PHP might prevent that.

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Necromancing the org.eclipse.amalgan.setup
Next Topic:Logo on Eclipse Installer
Goto Forum:
  


Current Time: Sun Dec 05 05:51:39 GMT 2021

Powered by FUDForum. Page generated in 0.02439 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top