Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » SetupTask with filter
SetupTask with filter [message #1721593] Thu, 28 January 2016 14:33 Go to next message
Catalin Samarghitan is currently offline Catalin SamarghitanFriend
Messages: 9
Registered: December 2015
Junior Member
Hello,

I'm trying to create a SetupTask that is OS specific. For that I used the build 1.3.0 (Build 2159) that should include the fix described here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=429245

But I can't figure out how to use the condition. I've tried with:
<setupTask
  xsi:type="setup:ResourceCreationTask"
  content="test"
  targetURL="${user.home/test.log}"
  filter="(osgi.os=linux)"
  />

and some variations around this, but I don't manage to make it work.

Could you give me some examples on how this filter should work? Or if I need to take another approach.

Thank you,
Catalin
Re: SetupTask with filter [message #1721674 is a reply to message #1721593] Fri, 29 January 2016 06:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31159
Registered: July 2009
Senior Member
Catalin,

Comments below.

On 28.01.2016 15:33, Catalin Samarghitan wrote:
> Hello,
>
> I'm trying to create a SetupTask that is OS specific. For that I used
> the build 1.3.0 (Build 2159) that should include the fix described here:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=429245
When you say you used that build, did you use it both for the download
of the installer and as the update site for creating the installation
itself?
>
> But I can't figure out how to use the condition. I've tried with:
>
> <setupTask
> xsi:type="setup:ResourceCreationTask"
> content="test"
> targetURL="${user.home/test.log}"
> filter="(osgi.os=linux)"
> />
>
> and some variations around this, but I don't manage to make it work.
That works for me. It's easy to test whether it's working by virtue of
the task being present in the installer's confirmation page...

Perhaps it's just not working in the final installation because it's
being installed using an older build...
>
> Could you give me some examples on how this filter should work? Or if
> I need to take another approach.
>
> Thank you,
> Catalin
>
Re: SetupTask with filter [message #1722071 is a reply to message #1721674] Tue, 02 February 2016 15:43 Go to previous messageGo to next message
Catalin Samarghitan is currently offline Catalin SamarghitanFriend
Messages: 9
Registered: December 2015
Junior Member
Hi,

Thank you for your answer.
I've used the build only for the installer, not for creating the installations.

I can see that in the plugins folder I have a good version:
 198049 Jan 26 06:44 plugins/org.eclipse.oomph.setup.core_1.3.0.v20160106-0618.jar
2610879 Jan 26 06:44 plugins/org.eclipse.oomph.setup.doc_1.3.0.v20150923-0945.jar
 139039 Jan 26 06:44 plugins/org.eclipse.oomph.setup.edit_1.3.0.v20160106-0618.jar
 681510 Jan 26 06:44 plugins/org.eclipse.oomph.setup.installer_1.3.0.v20160106-1533.jar
  39785 Jan 26 06:44 plugins/org.eclipse.oomph.setup.p2_1.3.0.v20160106-0618.jar
  23946 Jan 26 06:44 plugins/org.eclipse.oomph.setup.p2.edit_1.3.0.v20150923-1022.jar
 101944 Jan 26 06:44 plugins/org.eclipse.oomph.setup.sync_1.3.0.v20151212-0853.jar
 585318 Jan 26 06:44 plugins/org.eclipse.oomph.setup.ui_1.3.0.v20160106-1533.jar
 340478 Jan 26 06:44 plugins/org.eclipse.oomph.setup.ui.questionnaire_1.3.0.v20151231-0813.jar


> That works for me. It's easy to test whether it's working by virtue of
> the task being present in the installer's confirmation page...
This is what I do, I check if the step is present on the Bootstrap Tasks page. And is not.

Just to check if the filter works, I've tried to set it to true or (1=1), even so the task does not appear in the list.

Is there a way to enable more logging to debug the operations?

Thank you,
Re: SetupTask with filter [message #1722076 is a reply to message #1722071] Tue, 02 February 2016 16:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31159
Registered: July 2009
Senior Member
Catalin,

Note that once the resource exists, the task will be disabled, so
perhaps that's a point of confusion? Presumably you are on Linux?

If you provision an environment for Oomph itself, you can use a debug
launch of "Setup (Installer Dialog)" and set a breakpoint in
org.eclipse.oomph.setup.internal.core.AbstractSetupTaskContext.matchesFilterContext(String)org.eclipse.oomph.setup.internal.core.AbstractSetupTaskContext.matchesFilterContext(String)


On 02.02.2016 16:43, Catalin Samarghitan wrote:
> Hi,
>
> Thank you for your answer.
> I've used the build only for the installer, not for creating the
> installations.
>
> I can see that in the plugins folder I have a good version:
>
> 198049 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.core_1.3.0.v20160106-0618.jar
> 2610879 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.doc_1.3.0.v20150923-0945.jar
> 139039 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.edit_1.3.0.v20160106-0618.jar
> 681510 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.installer_1.3.0.v20160106-1533.jar
> 39785 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.p2_1.3.0.v20160106-0618.jar
> 23946 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.p2.edit_1.3.0.v20150923-1022.jar
> 101944 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.sync_1.3.0.v20151212-0853.jar
> 585318 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.ui_1.3.0.v20160106-1533.jar
> 340478 Jan 26 06:44
> plugins/org.eclipse.oomph.setup.ui.questionnaire_1.3.0.v20151231-0813.jar
>
>
>> That works for me. It's easy to test whether it's working by virtue
>> of the task being present in the installer's confirmation page...
> This is what I do, I check if the step is present on the Bootstrap
> Tasks page. And is not.
>
> Just to check if the filter works, I've tried to set it to true or
> (1=1), even so the task does not appear in the list.
>
> Is there a way to enable more logging to debug the operations?
>
> Thank you,
Re: SetupTask with filter [message #1722531 is a reply to message #1722076] Fri, 05 February 2016 13:29 Go to previous messageGo to next message
Catalin Samarghitan is currently offline Catalin SamarghitanFriend
Messages: 9
Registered: December 2015
Junior Member
Hi,

Yes, I'm under Linux.

So, I manage to do a debug and the problem seams to be generated a duplicated property 'JAVA.HOME' and 'java.home' in the MatchExpression.
Error message:
java.lang.IllegalArgumentException: case variants of the same key name: 'java.home'

I'll try to get only one of this keys.

Let me know if you have another suggestion.

Thank you,
Catalin
Re: SetupTask with filter [message #1722553 is a reply to message #1722531] Fri, 05 February 2016 16:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31159
Registered: July 2009
Senior Member
Catalin,

Please open a bugzilla. Is there a full stack trace? Hopefully I'll be
able to reproduce that problem somehow...


On 05.02.2016 14:29, Catalin Samarghitan wrote:
> Hi,
>
> Yes, I'm under Linux.
>
> So, I manage to do a debug and the problem seams to be generated a
> duplicated property 'JAVA.HOME' and 'java.home' in the MatchExpression.
> Error message:
> java.lang.IllegalArgumentException: case variants of the same key
> name: 'java.home'
> I'll try to get only one of this keys.
>
> Let me know if you have another suggestion.
>
> Thank you,
> Catalin
Re: SetupTask with filter [message #1725139 is a reply to message #1722553] Tue, 01 March 2016 08:51 Go to previous messageGo to next message
Catalin Samarghitan is currently offline Catalin SamarghitanFriend
Messages: 9
Registered: December 2015
Junior Member
It works with the latest build.

Thanks!
Re: SetupTask with filter [message #1725166 is a reply to message #1725139] Tue, 01 March 2016 10:26 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31159
Registered: July 2009
Senior Member
Catalin,

Thanks for confirming. :-) It was an easy fix; sorry it took so long.

On 01.03.2016 09:51, Catalin Samarghitan wrote:
> It works with the latest build.
>
> Thanks!
Previous Topic:Oomph filter explanation
Next Topic:Apply setup to workspace
Goto Forum:
  


Current Time: Mon Jun 01 13:29:50 GMT 2020

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

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

Back to the top