Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » How to use empty redirectable catalogs for projects
How to use empty redirectable catalogs for projects [message #1811062] Mon, 26 August 2019 08:53 Go to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
I have some small project models hosted in our git repository. We are using GitLab.

Until now we had to manually download the setup files for the project models to our working stations and add them to the projects view via the "Select Catalogs" button.

We would like to use the feature of "empty redirectable catalogs" as described in https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Hosting_your_own_index_.2F_catalogs and https://bugs.eclipse.org/bugs/show_bug.cgi?id=481580. We don't need any product models and we also don't want to host a complete index on our own.
However, I don't really get the gist of the description.

For testing purposes I wanted to use a local redirection instead of our git repository as to get the redirection working first. So I created a folder named "setups" in the Oomph Eclipse Installer directory (the folder where eclipse-inst, eclipse-inst.ini and so on are located) and put one of our project models in there. I also put a new project catalog in the setup folder, but both files are not visible in the installer.

I tried the following statement in the eclipse-inst.ini:
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->setups/

Re: How to use empty redirectable catalogs for projects [message #1811103 is a reply to message #1811062] Tue, 27 August 2019 02:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Are your repositories private? I.e., does access require authentication? I added some help for that in the wiki:

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

Unfortunately what you show will not work because the source and target of a redirection must both be absolute URIs.

I suppose we could be smarter when processing the URIs and check in the case of a relative URI if it specifies an existing file/directory in the file system, and convert it to an absolute path and then that to an absolute URI.

But in the end, you will likely be best off using a Configuration.

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

With such a thing, you could just drag and drop the Configuration link onto the installer. If your Configuration properly specifies an absolute URI that refers to your Project setup, ideally via a URI that navigates through the Project Catalog, the necessary redirection to redirect the redirectable Project Catalog to your Project Catalog will be done automatically (at least that's how it works when I last tested it).


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1811112 is a reply to message #1811103] Tue, 27 August 2019 06:30 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
Thank you for your quick reply, Ed.

Quote:
Are your repositories private? I.e., does access require authentication? I added some help for that in the wiki:

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


Yes, I will look into the link.

Quote:
Unfortunately what you show will not work because the source and target of a redirection must both be absolute URIs.

I read about it, I also tried using file:/data/user/eclipse-installer/setups, file://data/user/eclipse-installer/setups and file:///data/user/eclipse-installer/setups, but it didn't work either.


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

With such a thing, you could just drag and drop the Configuration link onto the installer. If your Configuration properly specifies an absolute URI that refers to your Project setup, ideally via a URI that navigates through the Project Catalog, the necessary redirection to redirect the redirectable Project Catalog to your Project Catalog will be done automatically (at least that's how it works when I last tested it).


Thanks I will also have a look at that.
Re: How to use empty redirectable catalogs for projects [message #1811113 is a reply to message #1811103] Tue, 27 August 2019 06:45 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
Ed Merks wrote on Tue, 27 August 2019 02:31

But in the end, you will likely be best off using a Configuration.

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

With such a thing, you could just drag and drop the Configuration link onto the installer. If your Configuration properly specifies an absolute URI that refers to your Project setup, ideally via a URI that navigates through the Project Catalog, the necessary redirection to redirect the redirectable Project Catalog to your Project Catalog will be done automatically (at least that's how it works when I last tested it).


Would this mean we always had to drag and drop the Configuration onto the installer? We want to avoid any manual effort.

The wiki says
Quote:
The installer application supports command line arguments so you could also specify a Configuration's file path or URL link on the command line to apply it automatically.

Does this mean we could also provide a link to our git lab repository?
Re: How to use empty redirectable catalogs for projects [message #1811115 is a reply to message #1811112] Tue, 27 August 2019 06:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
You are trying to redirect a single file.
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->file:/path/my.projects.catalog.setup
When trying to redirect a folder, both URIs should end in / but when redirecting a single file, neither should end in /.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1811121 is a reply to message #1811113] Tue, 27 August 2019 07:54 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
Ok, so I had a look at https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Accessing_Setups_that_Require_Authentication and tried
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->https://our.git.lab/our-project/oomph/raw/master/project.setup
and started the installer with
-Doomph.setup.ecf.trace=true
.
This is the output:
Quote:
> ECF: bogus:index:/redirectable.projects.setup uri=bogus:index:/redirectable.projects.setup
> ECF: bogus:index:/redirectable.projects.setup cacheURI=file:/home/torsten/.eclipse/org.eclipse.oomph.setup/cache/bogus_index__redirectable.projects.setup
> ECF: bogus:index:/redirectable.projects.setup eTag=null
> ECF: bogus:index:/redirectable.projects.setup expectedETag=null
> ECF: bogus:index:/redirectable.projects.setup authorizationHandler=org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl$AuthorizationHandlerImpl@21719a0 authorizations: {our.git.lab=Authorization [user=****, password=**** securePreferences: org.eclipse.oomph.preferences.util.PreferencesUtil$AutoRefreshSecurePreferencesWrapper@85ffca1f uiServices: org.eclipse.oomph.p2.internal.ui.P2ServiceUI@77ee25f1
> ECF: bogus:index:/redirectable.projects.setup trying=0
> ECF: bogus:index:/redirectable.projects.setup triedReauthorization=0
> ECF: bogus:index:/redirectable.projects.setup authorization=Authorization [user=, password=]
> ECF: bogus:index:/redirectable.projects.setup triedProxyReauthorization=0
> ECF: bogus:index:/redirectable.projects.setup proxyAuthorization=null
> ECF: bogus:index:/redirectable.projects.setup transferLister.exception
java.net.MalformedURLException: unknown protocol: bogus
at java.base/java.net.URL.<init>(URL.java:641)
at java.base/java.net.URL.fromURI(URL.java:708)
at java.base/java.net.URI.toURL(URI.java:1116)
at org.eclipse.ecf.provider.filetransfer.identity.FileTransferID.getURL(FileTransferID.java:78)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:877)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:576)
at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:106)
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl$InputStreamConnectionHandler.sendConnectionRequest(ECFURIHandlerImpl.java:1928)
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl$ConnectionHandler.process(ECFURIHandlerImpl.java:1648)
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1314)
at org.eclipse.oomph.setup.internal.core.util.ResourceMirror$LoadJob.perform(ResourceMirror.java:224)
at org.eclipse.oomph.util.WorkerPool$Worker.run(WorkerPool.java:428)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
~


When I append
?oomph_basic_auth=true
, I get asked for the password, but the same happens.
Re: How to use empty redirectable catalogs for projects [message #1811122 is a reply to message #1811115] Tue, 27 August 2019 08:01 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
Ed Merks wrote on Tue, 27 August 2019 06:47
You are trying to redirect a single file.
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->file:/path/my.projects.catalog.setup
When trying to redirect a folder, both URIs should end in / but when redirecting a single file, neither should end in /.


Thank you, so I changed it to:
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->https://our.git.lab/our-project/oomph/raw/master/


The log doesn't give out any error:
Quote:
> ECF: https://our.git.lab/our-project/oomph/raw/master/ returning successful results


However, I can't find the project files. I also looked in the "Select Catalogs" combo box. Do I have to create a project catalog to make this work? I only have project model setups so far.
Re: How to use empty redirectable catalogs for projects [message #1811124 is a reply to message #1811122] Tue, 27 August 2019 08:12 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
torsten piotraschke wrote on Tue, 27 August 2019 08:01
Ed Merks wrote on Tue, 27 August 2019 06:47
You are trying to redirect a single file.
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->file:/path/my.projects.catalog.setup
When trying to redirect a folder, both URIs should end in / but when redirecting a single file, neither should end in /.


Thank you, so I changed it to:
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->https://our.git.lab/our-project/oomph/raw/master/


The log doesn't give out any error:
Quote:
> ECF: https://our.git.lab/our-project/oomph/raw/master/ returning successful results


However, I can't find the project files. I also looked in the "Select Catalogs" combo box. Do I have to create a project catalog to make this work? I only have project model setups so far.

Ok, I guess I was too quick with this answer. I still get the bogus error, even if I use the master/ folder and also if I add an empty project catalog for testing purposes.
Re: How to use empty redirectable catalogs for projects [message #1811131 is a reply to message #1811124] Tue, 27 August 2019 09:46 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
When you first visit your gitlab server, how do you authenticate? I would have assumed you'd visit a login/sign-in page, not using basic authenticate where the browser pops up a credentials dialog. Isn't that the case? I.e., doesn't this case from the wiki apply?
https://gitlab-example.com/project/raw/branch/repo-path/Example.setup?oomph_form=b%27users/sign_in%27#/


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1811133 is a reply to message #1811131] Tue, 27 August 2019 10:31 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
Ed Merks wrote on Tue, 27 August 2019 09:46
When you first visit your gitlab server, how do you authenticate? I would have assumed you'd visit a login/sign-in page, not using basic authenticate where the browser pops up a credentials dialog. Isn't that the case? I.e., doesn't this case from the wiki apply?
https://gitlab-example.com/project/raw/branch/repo-path/Example.setup?oomph_form=b%27users/sign_in%27#/


I tried that option as well, but I get the same "bogus".

We are using SSO Keycloak for signing in.
Re: How to use empty redirectable catalogs for projects [message #1811136 is a reply to message #1811133] Tue, 27 August 2019 11:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Then none of the existing authentication mechanisms are likely to work because I have no idea how SSO Keycloak works. The existing mechanism only work for basic authentication or simple form/cookie-based authentication (that micks exactly what you do on a web form, without some two-phase thing in the way).

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1811149 is a reply to message #1811136] Tue, 27 August 2019 14:15 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
That's a pity. So using redirection via ssh is also no option?
Re: How to use empty redirectable catalogs for projects [message #1811150 is a reply to message #1811149] Tue, 27 August 2019 15:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Sorry, I've never tried to access a URL using ssh. I have no idea how or whether that would work; we using the Eclipse Communications Framework (ECF) under the covers.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1811173 is a reply to message #1811150] Wed, 28 August 2019 07:21 Go to previous messageGo to next message
torsten piotraschke is currently offline torsten piotraschkeFriend
Messages: 16
Registered: October 2017
Junior Member
Alright, so I was looking into your suggestion about using configurations and I was able to get it working with the "Apply configuration from the clipboard" button. The wiki also says

Quote:
The installer application supports command line arguments so you could also specify a Configuration's file path or URL link on the command line to apply it automatically.


So I ran the following on the command line:

./eclipse-inst file:///home/torsten/MyConfiguration.setup


Proceeding through the product page, I can see my project setup on the project page. So I'm going to create a shell script, which clones my configuration and project setup, then starts the eclipse-inst with my cloned configuration.

Thank you for your avid support, Ed! It's highly appreciated.
Re: How to use empty redirectable catalogs for projects [message #1811177 is a reply to message #1811173] Wed, 28 August 2019 08:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Thanks for posting a followup on your success. I appreciate that. Configurations are really extremely useful because you can put any tasks in there so it can be used also to eliminate prompted variable choices by defining the variable's value in the configuration...

One day someone might fund the effort to use this to drive a headless/command-line install...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1856434 is a reply to message #1811177] Fri, 09 December 2022 17:58 Go to previous messageGo to next message
Robert Neßelrath is currently offline Robert NeßelrathFriend
Messages: 12
Registered: December 2022
Junior Member
I have a similar problem, the setup file is somehow not correctly loaded from the redirection..

For testing I added a copy of the original redirectable projects setup file to a subfolder of my directory with the eclipse-inst.exe and tried to redirect to this one.
-Doomph.redirection.foo=index:/redirectable.projects.setup->file:/C:/Users/xxx/Desktop/Oomph/setups/test.setup.

When starting the installer I get the following error message:
No Configuration could be loadee from -doomph.redirection.foo=index:/redirectable.projects.setup->file:/C:/Users/xxx/Desktop/Oomph/setups/test.setup
The resource is empty.

What is wrong with this entry?

Re: How to use empty redirectable catalogs for projects [message #1856443 is a reply to message #1856434] Sat, 10 December 2022 06:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Did you add -Doomph.redirection.foo=index:/redirectable.projects.setup->file:/C:/Users/xxx/Desktop/Oomph/setups/test.setup to the *.ini? If so, did you add it after -vmargs line? If you are passing directly to the *.exe on the command line, you must put -vmargs in front of it so that it's not treated as a program argument. Your error message suggests it's being treated as a program argument not a vm. argument.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1856445 is a reply to message #1856443] Sat, 10 December 2022 09:29 Go to previous messageGo to next message
Robert Neßelrath is currently offline Robert NeßelrathFriend
Messages: 12
Registered: December 2022
Junior Member
Thank you Ed, the error message disappeared.

I played around with the redirectable.products.setup now:

-Doomph.redirection.foo=index:/redirectable.products.setup->file:/C:/Users/xxx/Desktop/OomphTest/setups/test.setup

The test setup file contains a ProductCatalog with two product.
I assume there should be a new product entry in the Product view now but it doesn't show up. Any idea what is wrong in this setting?
Re: How to use empty redirectable catalogs for projects [message #1856446 is a reply to message #1856445] Sat, 10 December 2022 10:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
There should be an additional product catalog as a new root object, but you likely have to scroll down to see it. Hit the "-" (collapse all) button to see all the roots (product catalogs). I'm assuming your looking at the advanced mode...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to use empty redirectable catalogs for projects [message #1856462 is a reply to message #1856446] Mon, 12 December 2022 07:50 Go to previous message
Robert Neßelrath is currently offline Robert NeßelrathFriend
Messages: 12
Registered: December 2022
Junior Member
I inspected the root products in advanced mode but only Eclipse.org, Eclipse.org Applications and dem empty <UserProduct> catalogs appear. I also activated all catalog filter, the entry for the redirectable product is missing.

But I now found a good solution by hosting my own index and can now completely customize the setup.

[Updated on: Fri, 06 January 2023 08:07]

Report message to a moderator

Previous Topic:Error Installing Eclipse Modeling Tools on M1 MacBookPro
Next Topic:Installing 2022-12 products warns about unsigned content
Goto Forum:
  


Current Time: Fri Apr 19 03:07:06 GMT 2024

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

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

Back to the top