Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Redirect setup file location after deployment
Redirect setup file location after deployment [message #1461139] Tue, 04 November 2014 08:43 Go to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
I have created several Oomph models now which probably won't make it into the official catalog any time soon. However, I would like to make sure that when someone uses the setup file to deploy an Eclipse, they can keep it updated after.

The setup file is always contained by version control (typically the same Git repository that is cloned by the setup).

Currently, I go into the appropriate catalog file (org.eclipse.project.catalog.setup or com.github.projects.catalog.setup) in {user}\.eclipse\org.eclipse.oomph.setup\setups\ and manually change the path.

Is there a way to include this "redirection" in the setup model?

Or do you have another solution for this use case?

Thanks!
Re: Redirect setup file location after deployment [message #1461154 is a reply to message #1461139] Tue, 04 November 2014 09:01 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 04.11.2014 um 09:43 schrieb Abel Hegedus:
> I have created several Oomph models now which probably won't make it into the official catalog any time soon. However,
> I would like to make sure that when someone uses the setup file to deploy an Eclipse, they can keep it updated after.
>
> The setup file is always contained by version control (typically the same Git repository that is cloned by the setup).
>
> Currently, I go into the appropriate catalog file (org.eclipse.project.catalog.setup or
> com.github.projects.catalog.setup) in {user}\.eclipse\org.eclipse.oomph.setup\setups\ and manually change the path.
>
> Is there a way to include this "redirection" in the setup model?
We do a similar thing for Oomph.setup with this task in the model:

<?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.SOME_ID"
value="=http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/->${git.clone.oomph.location|uri}/setups/"
vm="true"/>

You can copy this snippet and paste it directly into your model if you want!

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Redirect setup file location after deployment [message #1461197 is a reply to message #1461154] Tue, 04 November 2014 09:56 Go to previous messageGo to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
If I understand correctly, this redirection will happen every time the Eclipse is started, and if it gets the URI on the left of -> it will always replace it with the right side.

If so, the catalog would still contain the location that the Oomph installer stored upon drag&drop.

So I have two options:
1. Have all users always use the same path (e.g. by dragging a web URL instead of a downloaded file).
2. Create a variable that stores the original path of the file, ask that from the user (seems redundant, but acceptable), and put that in the redirection.

However, I wonder if it would be better to modify the catalog directly in some way, since both cases seem to be cumbersome and error-prone.
Re: Redirect setup file location after deployment [message #1461355 is a reply to message #1461197] Tue, 04 November 2014 13:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Abel,

Comments below.

On 04/11/2014 10:56 AM, Abel Hegedus wrote:
> If I understand correctly, this redirection will happen every time the
> Eclipse is started, and if it gets the URI on the left of -> it will
> always replace it with the right side.
Effectively this registered URI mappings in the URI map of every one of
the stup's resource set's URI converters.
>
> If so, the catalog would still contain the location that the Oomph
> installer stored upon drag&drop.
The user's catalog would contain the original reference pointing at some
web-hosted location...
>
> So I have two options:
> 1. Have all users always use the same path (e.g. by dragging a web URL
> instead of a downloaded file).
Eike's example is very general because it redirects everything, not just
one setup (because of course Oomph has all the setups, including the
catalogs and such)... I would expect your uses would use the
web-hosted URI and all of the same URI.
> 2. Create a variable that stores the original path of the file, ask
> that from the user (seems redundant, but acceptable), and put that in
> the redirection.
Maybe a more specific example makes it more clear:

<?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"
id="" option="-Doomph.redirection.cdosetup"
value="=http://git.eclipse.org/c/cdo/cdo.git/plain/plugins/org.eclipse.emf.cdo.releng/CDO.setup->${cdo.git.clone.location|uri}/plugins/org.eclipse.emf.cdo.releng/CDO.setup"
vm="true"/>


Here the CDO project hosts the setup in
http://git.eclipse.org/c/cdo/cdo.git/plain/plugins/org.eclipse.emf.cdo.releng/CDO.setup.
That's maintained in git and that's what anyone could add to their user
catalog if it weren't in the main catalog already. That setup has a
task, the one above, that redirects the web-hosted location that
everyone uses, to wherever the local clone is located. That can be and
generally is different on every machine. So once the user has cloned
the repository, the version in the local clone will be used instead of
the web-hosted one.
>
> However, I wonder if it would be better to modify the catalog directly
> in some way, since both cases seem to be cumbersome and error-prone.
Certainly if you want the users to have an up-to-date setup, it should
be hosted in some central location that you can update; the user should
not download it and copy it to their own machine, because that copy will
get out-of-date. Why is it cumbersome to drag a link? It's exactly the
same link they'd use to download the file, so better the user not
download it but rather use the link itself...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Redirect setup file location after deployment [message #1461377 is a reply to message #1461355] Tue, 04 November 2014 13:53 Go to previous messageGo to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
Thanks for the detailed answers Ed and Eike! I'll go with the redirect and web URL drag&drop.

I distinctly remember something about planning to change the way adding new setups would be handled. I imagine an "use link from clipboard" would be nice to have (similarly what EGit clone repository wizard does).
Re: Redirect setup file location after deployment [message #1461451 is a reply to message #1461377] Tue, 04 November 2014 15:22 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
In recent installer versions, you can add (and delete) project setups to (from) the user section of a catalog on the project selection wizard page (see the green plus in the upper right corner). This allows pasting a web address, where the setup is stored (for GitHub you can use the "raw" mode as in https://raw.githubusercontent.com/nittka/terminology/master/terminologyDev.setup). In this case the setup for the user is up to date without any redirection being necessary.

If you want local changes to the setup immediately active, you can redirect the setup location to the local git clone (as I do in that setup).

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Redirect setup file location after deployment [message #1461463 is a reply to message #1461451] Tue, 04 November 2014 15:36 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Alex,

Yes, and drag and drop should work too (and does on Windows), i.e., I
can drag the link from my browser and drop it on the project catalog...


On 04/11/2014 4:22 PM, Alexander Nittka wrote:
> In recent installer versions, you can add (and delete) project setups
> to (from) the user section of a catalog on the project selection
> wizard page (see the green plus in the upper right corner). This
> allows pasting a web address, where the setup is stored (for GitHub
> you can use the "raw" mode as in
> https://raw.githubusercontent.com/nittka/terminology/master/terminologyDev.setup).
> In this case the setup for the user is up to date without any
> redirection being necessary.
>
> If you want local changes to the setup immediately active, you can
> redirect the setup location to the local git clone (as I do in that
> setup).
>
> Alex


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic: There are failed tasks
Next Topic:java.lang.ExceptionInInitializerError in latest update
Goto Forum:
  


Current Time: Fri Apr 26 05:22:58 GMT 2024

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

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

Back to the top