Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Startup tasks not executed if project.setup is pulled from redirected setup
Startup tasks not executed if project.setup is pulled from redirected setup [message #1741289] Wed, 24 August 2016 11:51 Go to next message
Simon Stratmann is currently offline Simon StratmannFriend
Messages: 10
Registered: August 2016
Junior Member
Hi,

I have a project.setup file that contains some tasks for downloading and extratcing files and resource modification for bootstrapping and some tasks for eclipse workspace preferences, so startup tasks.


I redirect to a hosted org.eclipse.setup file that contains my setup.project file as "projectCatalog".

When I add the project.setup file in the advanced installer manually and install my project from that file everything is fine; at first startup the preferences are set and working sets are created.

If install using the hosted project.setup file that then none of the startup tasks are executed. The "Setup tasks" windows doesn't contain any of them. I'm 100% sure that the files are identical, I actually add them from my HTTP repository for the first test. So the only difference is how the installer accesses them. How is that possible?

setup.log from error case:
[2016-08-24 14:26:50] Performing post bootstrap tasks
[2016-08-24 14:26:50] 
[2016-08-24 14:26:50] Launching the installed product...
(EOF)


setup.log from positive case:
[2016-08-24 14:07:41] Performing post bootstrap tasks
[2016-08-24 14:07:41] 
[2016-08-24 14:07:41] Launching the installed product...
[2016-08-24 14:08:44] Executing startup tasks
[2016-08-24 14:08:45] Java(TM) SE Runtime Environment 1.8.0_60-b27
[2016-08-24 14:08:45] Product org.eclipse.products.epp.package.java.latest.released
... A lot more lines

[Updated on: Wed, 24 August 2016 12:28]

Report message to a moderator

Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741385 is a reply to message #1741289] Wed, 24 August 2016 15:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
It's almost impossible to guess what might be wrong without knows the details of what you've done. What's been redirected? What's all been copied? I.e., the entire setups folder? Some subset?

You know you can just redirect just the redirectable project catalog so that the rest is all reused, right: https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Hosting_your_own_index_.2F_catalogs


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741393 is a reply to message #1741385] Wed, 24 August 2016 16:52 Go to previous messageGo to next message
Simon Stratmann is currently offline Simon StratmannFriend
Messages: 10
Registered: August 2016
Junior Member
Hi Ed,

thanks for helping out. Tried using the redirection approach:

I added -Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->http://werum2103:5001/my.projects.setup to eclipse.inst.ini
my.projects.setup looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<setup:ProjectCatalog
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    xmlns:setup.targlets="http://www.eclipse.org/oomph/setup/targlets/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/targlets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupTarglets.ecore"
    name="org.eclipse"
    label="PAS-X SDK">
		<project href="http://werum2103:5001/setups/PASSDKProject.setup#/"/>
  <setupTask
        xsi:type="setup:EclipseIniTask"
        option="-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->http://werum2103:5001/my.projects.setup"
        value=""/>
</setup:ProjectCatalog>


I won't add the content of the actual project setup file as it's quite long. But it contains the same Eclipse Ini Task for forwarding.

Now when I install that project then no startup tasks are executed at all. Adding that setup file manually and installing with that project the tasks are executed at startup.

I even tried downloading the Ooomph source code and hosting the whole setup folder and using that and it still didn't work.

[Updated on: Wed, 24 August 2016 16:53]

Report message to a moderator

Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741395 is a reply to message #1741393] Wed, 24 August 2016 17:06 Go to previous messageGo to next message
Simon Stratmann is currently offline Simon StratmannFriend
Messages: 10
Registered: August 2016
Junior Member
Also, for a test, I disabled the automatic start of eclipse after installing. I opened the eclipse.ini and added the same redirections and update sites as in eclipse-inst.ini:
-Doomph.installer.update.url=http://pasxnexus.werum.net/nexus/content/groups/pasx_sdk_update_group
-Doomph.update.url=http://pasxnexus.werum.net/nexus/content/groups/pasx_sdk_update_group
-Doomph.redirection.myProjectCatalog=index:/redirectable.projects.setup->http://werum2103:5001/my.projects.setup


I started Eclipse and no startup tasks were performed. I opened the Catalog Index and made sure that my Project was contained there.

The correctly installed Eclipse contains my project in the "Open Setup" context menu, the wrong installed Eclipse does not.

Is the name of the option ("-Doomph.redirection.whatever") relevant (the "whatever" part")?

[Updated on: Wed, 24 August 2016 18:16]

Report message to a moderator

Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741413 is a reply to message #1741395] Wed, 24 August 2016 20:35 Go to previous messageGo to next message
Simon Stratmann is currently offline Simon StratmannFriend
Messages: 10
Registered: August 2016
Junior Member
Update: From the installed eclipse I can import the project in the "Projects into workspace" dialog and its tasks are executed. So the project file is fine and can be found by the installed Eclipse
Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741429 is a reply to message #1741413] Thu, 25 August 2016 05:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Simon,

Is the project simply contained in the catalog, or is it in a separate resource that's cross resource contained by the catalog? If the latter, what does the URI look like? Is it an absolute URI?

Note that the projects are referenced by the workspace.setup. You can use Navigate -> Open Setup -> Workspace to open it. From the context menu of the setup editor, you can use Open Text Editor to look at the file textually. What does the URI for the reference to the project setup look like? I suspect in both cases the project reference is present, but in the incorrectly functioning case that it's an unresolved proxy. Hence the question about how the project catalog references or contains the project setup, and this followup question about how the reference look in the workspace.setup.

When using -Doomph.redirection.*, the * has no semantic significance, other than the fact that multiple Eclipse Ini tasks can be merged, so if there is more than one task for -Dxyz=abc and -Dxyz=def you'll end up with a single task, so definitely it's good to make the * part unique in your overall context.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741440 is a reply to message #1741429] Thu, 25 August 2016 07:49 Go to previous messageGo to next message
Simon Stratmann is currently offline Simon StratmannFriend
Messages: 10
Registered: August 2016
Junior Member
Hi Ed,

the file my.projects.setup I quoted above (and which I redirect to) contains an absolute link to my project: <project href="http://werum2103:5001/setups/PASSDKProject.setup#/"/>

For the positive case my workspace.setup looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<setup:Workspace
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    name="workspace">
  <setupTask
      xsi:type="setup:VariableTask"
      name="eclipse.target.platform"
      value="Neon"
      defaultValue="Neon"
      label="Target Platform">
    <description>Choose the compatibility level of the target platform</description>
  </setupTask>
  <stream href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='user.project']/@projects[name='PAS-X%20SDK24']/@streams[name='master']"/>
</setup:Workspace>


For the one where it doesn't work it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<setup:Workspace
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    name="workspace"/>


So it doesn't contain any mention of a setup task or my project. But user.setup actually contains an unresolved project. The warning displayed in the setup editor:

 The feature 'restrictions' of ' PAS-X SDK24' contains an unresolved proxy ' index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='PAS-X%20SDK24']'


Content of the user.setup file:
<?xml version="1.0" encoding="UTF-8"?>
<setup:User
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    name="Administrator"
    unsignedPolicy="ACCEPT">
  <setupTask
      xsi:type="setup:CompoundTask"
      name="PAS-X SDK Projects">
    <restriction
        xsi:type="setup:ProjectCatalog"
        href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>
    <setupTask
        xsi:type="setup:CompoundTask"
        name="PAS-X SDK24">
      <restriction
          xsi:type="setup:Project"
          href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='PAS-X%20SDK24']"/>
      <setupTask
          xsi:type="setup:VariableTask"
          name="sdk.id"
          value="fromweb3"
          label="Name of the SDK (determines installation folder and workspace name. No spaces!!!)"/>
      <setupTask
          xsi:type="setup:VariableTask"
          name="install.root"
          value="e:\Projects"
          defaultValue="e:\Projects"/>
    </setupTask>
  </setupTask>
  <acceptedLicense>DEFAULT_LICENSE Marker to remember license pre-prompting</acceptedLicense>
  <acceptedLicense>6a3d083ad2bd7d3a80ee293235f8c5b1 Eclipse Foundation Software User Agreement</acceptedLicense>
  <acceptedLicense>abc76a6cc9d06e4684ff61ed74a972c Eclipse Foundation Software User Agreement</acceptedLicense>
  <acceptedLicense>731702f483d5de88d5a85543a649cb74 SPRING IDE PROJECT SOFTWARE USER AGREEMENT</acceptedLicense>
  <acceptedLicense>2b495527b315808f459ac5454dbbe2da Eclipse Integration Commons 3.8.0 GA</acceptedLicense>
  <acceptedLicense>aa1a84ed6378c1cdba13a100c225aa57 Eclipse Foundation Software User Agreement</acceptedLicense>
  <acceptedLicense>b7a823f17bfa0073f4413c5638a30054 The TMate Open Source License</acceptedLicense>
  <acceptedLicense>4420907242c49cfbbc1776eaa3ae7a79 Pivotal tc Sever Integration for Eclipse 3.8.0 GA</acceptedLicense>
  <acceptedLicense>a4f11ab3cd6579b763157aa48441b3bc Subclipse Software User Agreement</acceptedLicense>
  <acceptedLicense>3641c6b239e0abe8026299bd04d700e2 License Agreement for ZeroTurnaround Software</acceptedLicense>
  <acceptedLicense>121140a2cbaa22d157099dd10a242d92 Eclipse Public License - v 1.0</acceptedLicense>
  <acceptedLicense>30d252f582a9f4ebadd81c36d1b23c52 Eclipse Public License - v 1.0</acceptedLicense>
</setup:User>


So it seems indeed that something cannot be resolved but I have no idea what that could be or how to fix it.

Thanks for the help, I appreciate it.

Update: I also noticed that when using the manually added project the installer displays a selection box for the target platform, but not when using the redirected setup file.

[Updated on: Thu, 25 August 2016 16:05]

Report message to a moderator

Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741542 is a reply to message #1741440] Thu, 25 August 2016 17:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Comments below.

Simon Stratmann wrote on Thu, 25 August 2016 03:49
Hi Ed,

the file my.projects.setup I quoted above (and which I redirect to) contains an absolute link to my project: <project href="http://werum2103:5001/setups/PASSDKProject.setup#/"/>

For the positive case my workspace.setup looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<setup:Workspace
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    name="workspace">
  <setupTask
      xsi:type="setup:VariableTask"
      name="eclipse.target.platform"
      value="Neon"
      defaultValue="Neon"
      label="Target Platform">
    <description>Choose the compatibility level of the target platform</description>
  </setupTask>
  <stream href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='user.project']/@projects[name='PAS-X%20SDK24']/@streams[name='master']"/>
</setup:Workspace>


Note that this is referencing the file via the user.project of the eclipse.org project catalog, not via your product catalog.

Quote:

For the one where it doesn't work it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<setup:Workspace
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    name="workspace"/>


So it doesn't contain any mention of a setup task or my project. But user.setup actually contains an unresolved project. The warning displayed in the setup editor:

 The feature 'restrictions' of ' PAS-X SDK24' contains an unresolved proxy ' index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='PAS-X%20SDK24']'


Here it seems to be expecting it to be directly in the org.eclipse project catalog.

Quote:

Content of the user.setup file:
<?xml version="1.0" encoding="UTF-8"?>
<setup:User
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    name="Administrator"
    unsignedPolicy="ACCEPT">
  <setupTask
      xsi:type="setup:CompoundTask"
      name="PAS-X SDK Projects">
    <restriction
        xsi:type="setup:ProjectCatalog"
        href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']"/>
    <setupTask
        xsi:type="setup:CompoundTask"
        name="PAS-X SDK24">
      <restriction
          xsi:type="setup:Project"
          href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='PAS-X%20SDK24']"/>
      <setupTask
          xsi:type="setup:VariableTask"
          name="sdk.id"
          value="fromweb3"
          label="Name of the SDK (determines installation folder and workspace name. No spaces!!!)"/>
      <setupTask
          xsi:type="setup:VariableTask"
          name="install.root"
          value="e:\Projects"
          defaultValue="e:\Projects"/>
    </setupTask>
  </setupTask>
  <acceptedLicense>DEFAULT_LICENSE Marker to remember license pre-prompting</acceptedLicense>
  <acceptedLicense>6a3d083ad2bd7d3a80ee293235f8c5b1 Eclipse Foundation Software User Agreement</acceptedLicense>
  <acceptedLicense>abc76a6cc9d06e4684ff61ed74a972c Eclipse Foundation Software User Agreement</acceptedLicense>
  <acceptedLicense>731702f483d5de88d5a85543a649cb74 SPRING IDE PROJECT SOFTWARE USER AGREEMENT</acceptedLicense>
  <acceptedLicense>2b495527b315808f459ac5454dbbe2da Eclipse Integration Commons 3.8.0 GA</acceptedLicense>
  <acceptedLicense>aa1a84ed6378c1cdba13a100c225aa57 Eclipse Foundation Software User Agreement</acceptedLicense>
  <acceptedLicense>b7a823f17bfa0073f4413c5638a30054 The TMate Open Source License</acceptedLicense>
  <acceptedLicense>4420907242c49cfbbc1776eaa3ae7a79 Pivotal tc Sever Integration for Eclipse 3.8.0 GA</acceptedLicense>
  <acceptedLicense>a4f11ab3cd6579b763157aa48441b3bc Subclipse Software User Agreement</acceptedLicense>
  <acceptedLicense>3641c6b239e0abe8026299bd04d700e2 License Agreement for ZeroTurnaround Software</acceptedLicense>
  <acceptedLicense>121140a2cbaa22d157099dd10a242d92 Eclipse Public License - v 1.0</acceptedLicense>
  <acceptedLicense>30d252f582a9f4ebadd81c36d1b23c52 Eclipse Public License - v 1.0</acceptedLicense>
</setup:User>


Here it also appears to assume it's directly in the org.eclipse project catalog.

Now I noticed that you named your project catalog like this name="org.eclipse" but that's the same name as the existing org.eclipse catalog, so resolving any proxy is likely to resolve to the wrong project catalog, and then not find your project in that catalog. You must ensure that each project catalog has a unique name. Best to rename your project catalog to something else!

Quote:


So it seems indeed that something cannot be resolved but I have no idea what that could be or how to fix it.

Thanks for the help, I appreciate it.

Update: I also noticed that when using the manually added project the installer displays a selection box for the target platform, but not when using the redirected setup file.



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1741612 is a reply to message #1741542] Fri, 26 August 2016 10:15 Go to previous messageGo to next message
Simon Stratmann is currently offline Simon StratmannFriend
Messages: 10
Registered: August 2016
Junior Member
Ed, renaming the projects catalog doesn't help. The user.setup doesn't show any conflicts, neither does workspace.setup. My project setup is still not displayed in the navigate menu and its tasks aren't executed.

I'm giving up, users will need to know what to select and add the setup file manually.

[Updated on: Fri, 26 August 2016 10:16]

Report message to a moderator

Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1774999 is a reply to message #1741612] Mon, 23 October 2017 11:21 Go to previous messageGo to next message
Adrian Price is currently offline Adrian PriceFriend
Messages: 8
Registered: October 2017
Junior Member
-comment deleted-

[Updated on: Mon, 23 October 2017 15:34]

Report message to a moderator

Re: Startup tasks not executed if project.setup is pulled from redirected setup [message #1775000 is a reply to message #1774999] Mon, 23 October 2017 11:31 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Here's one from the Oomph.setup:
<?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.setups"
    value="=http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/->${git.clone.oomph.location|uri}/setups/"
    vm="true"/>
Note it's a VM option (not a program option), and that it does use -D to specify system property, and that the value specifically does include the "=".


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:JRETask setting jreExternalAnns property?
Next Topic:Eclipse Docker plugin error while building source code
Goto Forum:
  


Current Time: Sun Dec 08 05:52:01 GMT 2024

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

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

Back to the top