Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » VariableTask inconsistent behavior
VariableTask inconsistent behavior [message #1806335] Tue, 07 May 2019 20:31 Go to next message
Felipe Malaquias is currently offline Felipe MalaquiasFriend
Messages: 2
Registered: May 2019
Junior Member
Dear colleagues,

I've been recently introduced to the Oomph Setup topic and I'm currently struggling with inconsistent behavior of VariableTasks across different workstations.

In this particular example, I defined the following task for selecting the cacerts file location to be used as truststore for https by eclipse (eclipse.ini, -Djavax.net.ssl.trustStore)

<setupTask
        xsi:type="setup:VariableTask"
        id="cacerts.location"
        type="FILE"
        name="cacerts.location"
        value=""
        defaultValue="${user.home/.java/cacerts}"
        label="Java cacerts">
      <description>The java cacerts file location</description>
    </setupTask>


In my environment it consistently displays a field for file selection in my installer, but at some colleagues workstations the field is not displayed at all (even after attempts to clear eclipse installer caches in the user directory).
How is this possible and how to troubleshoot/resolve it?

Thanks!
Re: VariableTask inconsistent behavior [message #1806347 is a reply to message #1806335] Wed, 08 May 2019 03:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Does the field show if you enable "Show all variables" on the Variables page? That should have the effective of ignoring (for the purpose of prompting) all Variables that are already saved in the user.setup, installation.setup, or workspace.setup, though showing the current value when prompting.

Note too that just defining a Variable will not automatically result in it being prompted; the Variable must be used by some task in order for it to be prompted.

Also note that the scope of the variable affects where the value is stored. Presumably the value will be stored in the user.setup in your case. Likely you want to use this same cached value across all things you install and might well want to include the following annotation on the Variable:
<?xml version="1.0" encoding="UTF-8"?>
<base:Annotation
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:base="http://www.eclipse.org/oomph/base/1.0"
    source="http://www.eclipse.org/oomph/setup/GlobalVariable"/>
You should look carefully in the user.setup to see how/where the variable's value is stored.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: VariableTask inconsistent behavior [message #1806445 is a reply to message #1806347] Thu, 09 May 2019 07:52 Go to previous messageGo to next message
Felipe Malaquias is currently offline Felipe MalaquiasFriend
Messages: 2
Registered: May 2019
Junior Member
Thanks for the hints Ed.

1- "Does the field show if you enable "Show all variables" on the Variables page?"
No, the show all variables is checkbox is checked and the field is not visible

2- "Note too that just defining a Variable will not automatically result in it being prompted; the Variable must be used by some task in order for it to be prompted. "
That's right, but the variable is used in Eclipse ini tasks

3- "Also note that the scope of the variable affects where the value is stored."
I'd rather keep the variable without global annotation and I'd like the field to be displayed on every single installation for now

4- You should look carefully in the user.setup to see how/where the variable's value is stored.
The variable is stored at my project level, in the same way I've defined it in the installer.

Would you have any other hint on how I could troubleshoot this? Thanks!
Re: VariableTask inconsistent behavior [message #1806446 is a reply to message #1806445] Thu, 09 May 2019 08:14 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
1. The value of the variable must come from somewhere if it's used in some task...
2. If it's used in a task, then when reviewing the tasks, you can see what value is being used. That value must come from somewhere. So look closely at the EclipseIni tasks on the confirmation page. Is that task present? What value does it show? If it's not present, you can still see it if you select to show all triggered tasks (and it will be disabled).
3. You can set the storage URI to scope://Installation so that it's only stored in the installation that's been created and will be prompted again for each different installation.
4. The variable with its user-assigned value will be stored somewhere, either the user.setup, the installation.setup, or the workspace.setup. It absolutely must be stored somewhere, otherwise the user would be prompted again for it when they launch their installation. I suspect it's stored in the user.setup, restricted to the project in which you've defined the variable in the setup.

You can run the installer with these VM arguments:
 -Duser.home=D:\sandbox\USER-HOME
-Doomph.setup.user.home.redirect=true
If you're on Windows you can use the latest installer form https://wiki.eclipse.org/Eclipse_Installer and run it with -vmargs followed by these arguments on the command line. On the other OSes you'll have to modify the eclipse-inst-ini. This will run the installer in a clean environment with an empty user home folder just like any first time user will experience. That absolutely should prompt the for variable, and if you give it some funky bogus value, you can search the fake home folder for that value to see where it stored.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Installation of IU dependent on Eclipse platform
Next Topic:Can't install Eclipse 2019-03
Goto Forum:
  


Current Time: Thu Apr 18 04:08:03 GMT 2024

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

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

Back to the top