Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » ${installation.location} points to base path
${installation.location} points to base path [message #1727147] Sun, 20 March 2016 09:25 Go to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey Razz

I'm try to set the eclipse workspace name (/instance/org.eclipse.ui.ide/WORKSPACE_NAME) using the variable ${installation.location|lastSegment}. Unfortunately, during STARTUP it points to the base folder e.g. "C:\_dev". It's strange, as my file creation task during the BOOTSTRAP goes correctly to e.g. "C:\_dev\project-develop2". Is this expected behavior?

As a workaround I use then workspace location (set to "C:\_dev\project-develop2\ws") with the following variable: ${workspace.location|basePath|lastSegment}

Thanks,

Kon

Re: ${installation.location} points to base path [message #1727148 is a reply to message #1727147] Sun, 20 March 2016 09:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 20.03.2016 um 10:25 schrieb kon f:
> Hey :p
> I'm try to set the eclipse workspace name (/instance/org.eclipse.ui.ide/WORKSPACE_NAME) using the variable
> ${installation.location|lastSegment}. Unfortunately, during STARTUP it points to the base folder e.g. "C:\_dev". It's
> strange, as my file creation task during the BOOTSTRAP goes correctly to e.g. "C:\_dev\project-develop2". Is this
> expected behavior?
> As a workaround I use then workspace location (set to "C:\_dev\project-develop2\ws") with the following variable:
> ${workspace.location|basePath|lastSegment}
I use this task to set the workspace name:

<?xml version="1.0" encoding="UTF-8"?>
<setup:PreferenceTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
key="/instance/org.eclipse.ui.ide/WORKSPACE_NAME"
value="${installation.location|lastSegment|allcap}"/>

And it works perfectly. I don't have enough information to tell what's going wrong for you. Can you paste a screenshot
of the installer's Confirmation page with the PreferenceTask selected?

BTW., I also have this task in my user.seup, which sets the workspace location to my preferred pattern even for
project-less installs:

<?xml version="1.0" encoding="UTF-8"?>
<setup:ResourceCreationTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
excludedTriggers="STARTUP MANUAL"
content="eclipse.preferences.version=1&#xD;&#xA;RECENT_WORKSPACES_PROTOCOL=3&#xD;&#xA;RECENT_WORKSPACES=${installation.location/ws|property}&#xD;&#xA;MAX_RECENT_WORKSPACES=10&#xD;&#xA;SHOW_WORKSPACE_SELECTION_DIALOG=false&#xD;&#xA;"
targetURL="configuration:/.settings/org.eclipse.ui.ide.prefs"/>


Cheers
/Eike

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


Re: ${installation.location} points to base path [message #1727152 is a reply to message #1727148] Sun, 20 March 2016 10:16 Go to previous messageGo to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey Eike,

I use two project files during the installation (one only contains custom user preferences). Just to make sure the installation location is not somehow cached (I deleted the content and reinstalled a couple times into ilb-develo2), I tried "ilb-develop99" ... but the result is the same.

index.php/fa/25354/0/

Best regards,

Kon
Re: ${installation.location} points to base path [message #1727167 is a reply to message #1727152] Sun, 20 March 2016 17:42 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 20.03.2016 um 11:17 schrieb kon f:
> Hey Eike,
>
> I use two project files during the installation (one only contains custom user preferences).
None of them contains a task with the ID "installation", right?

> Just to make sure the installation location is not somehow cached (I deleted the content and reinstalled a couple times into ilb-develo2), I tried "ilb-develop99" ... but the result is the same.
If you "Perform Setup Tasks..." in your IDE, click the "Show all triggered tasks" checkbox and select the very first
task in the list (should be the InstallationTask), what does it show in the Properties table? Please make another
screenshot.

Cheers
/Eike

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


Re: ${installation.location} points to base path [message #1727301 is a reply to message #1727167] Mon, 21 March 2016 21:31 Go to previous messageGo to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey Eike,

just to make it simpler, I just installed from one project file.

The first screenshot shows the correct path (also for resource creation tasks on the bottom).

index.php/fa/25374/0/

From here, it's getting strange since WORKSPACE_NAME is set to ${installation.location|lastSegment}

index.php/fa/25375/0/

As the path has been changed, the files that were already created during bootstrap are created again (because they do not exist, right?).

index.php/fa/25376/0/

At the end, I figured out that the wrong path is caused from this task (if I remove it works as expected):

<setupTask
      xsi:type="setup:EclipseIniTask"
      excludedTriggers="STARTUP MANUAL"
      option="-Dosgi.configuration.area="
      value="${installation.location/configuration}"
      vm="true"/>


The installer performs correct and as eclipse starts .. is somehow uses the parent path C:\_dev as installation location ... Am I doing it wrong Very Happy ?

Thank you!

Kon
  • Attachment: 01.png
    (Size: 86.04KB, Downloaded 1037 times)
  • Attachment: 02.png
    (Size: 148.95KB, Downloaded 977 times)
  • Attachment: 03.png
    (Size: 146.14KB, Downloaded 955 times)

[Updated on: Mon, 21 March 2016 21:57]

Report message to a moderator

Re: ${installation.location} points to base path [message #1727319 is a reply to message #1727301] Tue, 22 March 2016 07:11 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 21.03.2016 um 22:31 schrieb kon f:
> At the end I figured out that wrong path was caused from this task:
>
> <setupTask
> xsi:type="setup:EclipseIniTask"
> excludedTriggers="STARTUP MANUAL"
> option="-Dosgi.configuration.area"
> value="=../configuration"
> vm="true">
> <description>Set custom path for the eclipse configuration area</description>
> </setupTask>
Where does this task come from??

>
> I had to change it to:
>
> <setupTask
> xsi:type="setup:EclipseIniTask"
> excludedTriggers="STARTUP MANUAL"
> option="-Dosgi.configuration.area="
> value="../configuration"
> vm="true">
> <description>Set custom path for the eclipse configuration area</description>
> </setupTask>
>
> Is this expected that the = has to be in the option attribute?
Yes, the "=" must be part of the value! The option string is used for task merging.

Cheers
/Eike

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


Previous Topic:Unable to install WebLogic server tools
Next Topic:Export current Eclipse installation to *.setup file
Goto Forum:
  


Current Time: Thu Apr 25 10:09:16 GMT 2024

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

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

Back to the top