Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » [solved] Use own tasks(After creating tasks I would like to use them)
[solved] Use own tasks [message #1724365] Tue, 23 February 2016 11:39 Go to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

Hello everybody,

With your help I could build my own tasks. Now I would like to use them.

I've already put my Ecore models on a public github repo and set their namespace location accordingly. In lack of an own server I would like to keep my compiled tasks at my local machine . I exported them as ``deployable plugins''.

How can I reference a folder as the repository of the tasks? Do the jar files need a special name?

Thanks in advance Smile


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods

[Updated on: Thu, 03 March 2016 13:19]

Report message to a moderator

Re: Use own tasks [message #1724474 is a reply to message #1724365] Wed, 24 February 2016 07:41 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Steffen,

Exporting your plugins as "Deployable Plugins" is not the right thing to do. You need to create an update site (also
called a p2 repository) as explained in
http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fconcepts%2Fupdate_site.htm (or elsewhere).
The URL of this update site must be eneterd into the Setup Task wizard's "Enablement URL" field. If you've already
finished the wizard earlier, create a new temporary setup task and enter a marker string such as "http://XXXXX" as the
Enablement URL. Then you can search for occurrences of this string and fix these places in your original task projects.

Cheers
/Eike

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



Am 23.02.2016 um 12:39 schrieb Steffen Holzer:
> Hello everybody,
> With your help I could build my own tasks. Now I would like to use them.
> I've already put my Ecore models on a public github repo and set their namespace location accordingly. In lack of an
> own server I would like to keep my compiled tasks at my local machine . I exported them as ``deployable plugins''.
> How can I reference a folder as the repository of the tasks? Do the jar files need a special name?
> Thanks in advance :)


Re: Use own tasks [message #1724529 is a reply to message #1724474] Wed, 24 February 2016 12:03 Go to previous messageGo to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

Thank you, that hint helped a lot.

I created now an update site locally. My Ecore model points to the folder of the index.html ( C:\oomph\server\ in this case). I can install my tasks as plugins in eclipse itself now.

But they still don't show up or get executed when running the installer. I get neither a warning or a stack trace in the logs.

I gave both my tasks a priority of 100 (Redirection) and the isNeeded() method always returns true. Furthermore I declared them as predeccessors of the installation task.

Is there a verbose mode for the eclipse installer?

I would appreciate any help Confused


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods
Re: Use own tasks [message #1724532 is a reply to message #1724529] Wed, 24 February 2016 12:59 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 24.02.2016 um 13:03 schrieb Steffen Holzer:
> Thank you, that hint helped a lot.
> I created now an update site locally. My Ecore model points to the folder of the index.html ( C:\oomph\server\ in this
> case). I can install my tasks as plugins in eclipse itself now.
> But they still don't show up or get executed when running the installer.
On the Confirmation page you can select "Show all triggered tasks". Does it show up then?

> I get neither a warning or a stack trace in the logs.
> I gave both my tasks a priority of 100 (Redirection) and the isNeeded() method always returns true. Furthermore I
> declared them as predeccessors of the installation task.
To diagnose your problem it might help to use all the default values. Does that make the task show up?

> Is there a verbose mode for the eclipse installer?
No. You could provision an Oomph workspace, import your task projects, and use the debugger with the "Setup (Installer
Dialog)" launch. Breakpoints in your isNeeded() and perform() methods might help to see what's going on.

Cheers
/Eike

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


Re: Use own tasks [message #1724678 is a reply to message #1724532] Thu, 25 February 2016 12:09 Go to previous messageGo to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

>> Thank you, that hint helped a lot.
>> I created now an update site locally. My Ecore model points to the folder of the index.html ( C:\oomph\server\ in this
>> case). I can install my tasks as plugins in eclipse itself now.
>> But they still don't show up or get executed when running the installer.
>On the Confirmation page you can select "Show all triggered tasks". Does it show up then?
No, they don't.

>> I get neither a warning or a stack trace in the logs.
> >I gave both my tasks a priority of 100 (Redirection) and the isNeeded() method always returns true. Furthermore I
>> declared them as predeccessors of the installation task.
>To diagnose your problem it might help to use all the default values. Does that make the task show up?
Not at all. I implemented the most default task (all triggers, only logs (''implement me'') on perform()). But they task still doesn't show up or gets executed.

>> Is there a verbose mode for the eclipse installer?
>No. You could provision an Oomph workspace, import your task projects, and use the debugger with the "Setup (Installer
Dialog)" launch. Breakpoints in your isNeeded() and perform() methods might help to see what's going on.
Thank you for the suggestion. I should have thought of that myself. I found that none of the methods of my tasks get even called.


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods
Re: Use own tasks [message #1724875 is a reply to message #1724678] Fri, 26 February 2016 16:58 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 25.02.2016 um 13:09 schrieb Steffen Holzer:
>>> Thank you, that hint helped a lot.
>>> I created now an update site locally. My Ecore model points to the folder of the index.html ( C:\oomph\server\ in
>>> this case). I can install my tasks as plugins in eclipse itself now.
>>> But they still don't show up or get executed when running the installer.
>> On the Confirmation page you can select "Show all triggered tasks". Does it show up then?
> No, they don't.
>
>>> I get neither a warning or a stack trace in the logs.
>> >I gave both my tasks a priority of 100 (Redirection) and the isNeeded() method always returns true. Furthermore I
>>> declared them as predeccessors of the installation task.
>> To diagnose your problem it might help to use all the default values. Does that make the task show up?
> Not at all. I implemented the most default task (all triggers, only logs (''implement me'') on perform()). But they
> task still doesn't show up or gets executed.
>
>>> Is there a verbose mode for the eclipse installer?
>> No. You could provision an Oomph workspace, import your task projects, and use the debugger with the "Setup (Installer
> Dialog)" launch. Breakpoints in your isNeeded() and perform() methods might help to see what's going on.
> Thank you for the suggestion. I should have thought of that myself. I found that none of the methods of my tasks get
> even called.
Without your task model and code I can't debug it myself. Maybe you set a breakpoint in
SetupTaskPerformer.initTriggeredSetupTasks() to get more clues...

Cheers
/Eike

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


Re: Use own tasks [message #1725093 is a reply to message #1724875] Mon, 29 February 2016 17:14 Go to previous messageGo to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

I uploaded my test task to github: https://github.com/themetalone/trivial-oomph-task.git as well as the model and the update site

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods
Re: Use own tasks [message #1725168 is a reply to message #1725093] Tue, 01 March 2016 10:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Steffen,

Looking at just the model,
https://github.com/themetalone/trivial-oomph-task/blob/master/Trivial/model/Trivial.ecore
I see

<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="schemaLocation" value="http://www.example.org/Trivial/schemas/Trivial-1.0.ecore"/>
</eAnnotations>

So that

So that tells me that there is no way that a dynamic version of your
model will ever be found. Notice that we have something like this in
our Git model

<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="schemaLocation"
value="http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Git.ecore"/>
</eAnnotations>

And most important, that one can really load an Ecore model from this URL.

This is closely related to the publicationLocation which you have as

publicationLocation="C:/oomph/server/models/trivia.ecore"

but in our Git *.genmodel is:

publicationLocation="/setups/models/Git.ecore">

In our case that refers to a project in the workspace; the property
documented to be a workspace-relative path.

Without a dynamic version of the model being available, the installer
will not be able to read your task instances, and will not be able to
discover the update site with the implementation of your task.


On 29.02.2016 18:14, Steffen Holzer wrote:
> I uploaded my test task to github:
> https://github.com/themetalone/trivial-oomph-task.git as well as the
> model and the update site


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Use own tasks [message #1725173 is a reply to message #1725168] Tue, 01 March 2016 11:11 Go to previous messageGo to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

Thank you very much. I thought I set the schema location right but obviously I didn't.

For testing purposes: would file:///C:/.../Trivial.ecore be understood for a local model?


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods

[Updated on: Tue, 01 March 2016 11:20]

Report message to a moderator

Re: Use own tasks [message #1725182 is a reply to message #1725173] Tue, 01 March 2016 12:39 Go to previous messageGo to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

I started from scratch with a new simple task (in the same repository under the name -simple-).

But my problems stay. I have a workspace dependent publication location and my schemaLocations point to the ecore model.


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods
Re: Use own tasks [message #1725183 is a reply to message #1725182] Tue, 01 March 2016 12:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
So now you have this for the schema location:

value="file:///C:/oomph/server/simple.ecore"

And this for your publication location:

publicationLocation="/simple/model/Simple-1.0.ecore"

How does Simple-1.0.ecore that's published end up at the location
C:/oomph/server/simple.ecore where the installer can read it?


On 01.03.2016 13:39, Steffen Holzer wrote:
> I started from scratch with a new simple task (in the same repository
> under the name -simple-).
> But my problems stay. I have a workspace dependent publication
> location and my schemaLocations point to the ecore model.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Use own tasks [message #1725185 is a reply to message #1725183] Tue, 01 March 2016 13:25 Go to previous messageGo to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

I put it there by hand since I want it all in that little fake server at C:\oomph\server.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods
Re: Use own tasks [message #1725187 is a reply to message #1725185] Tue, 01 March 2016 13:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Steffen,

Are you running the installer under debug control so you can monitor
what it's doing? The first thing that must work is that the dynamic
model is being used to process your specialized task instances. So you
have somewhere a *.setup that uses your task (this latest one) and the
resource has this latest file: location so that the dynamic Ecore model
can be found?

On 01.03.2016 14:25, Steffen Holzer wrote:
> I put it there by hand since I want it all in that little fake server
> at C:\oomph\server.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Use own tasks [message #1725433 is a reply to message #1725187] Thu, 03 March 2016 13:19 Go to previous messageGo to next message
Steffen Holzer is currently offline Steffen HolzerFriend
Messages: 59
Registered: January 2016
Member

Hi Ed,

Thank you a thousand times for your patience and help. I solved my problems with:


  • publish the model directly to the update site project in the workspace
  • Using the file:// protocoll to address my local files
  • Using only unix conform path seperators '/'
  • And of course fixing my old product setups

I managed to get my task performed. I feel really dumb by now ^^

But the debug run of the installer is pretty silent since only really grave errors are printed in the log.


"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" - John Woods
Re: Use own tasks [message #1725438 is a reply to message #1725433] Thu, 03 March 2016 13:37 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Steffen,

There are certainly quite a large number of relatively magical things
that need to all work in combination and yes, the failure to load a
resource is relatively quiet affair because networks fail constantly and
index refers to resources not maintained by us that can introduce errors
as well, which if we logged them, would generally result in people
opening bugs or automated problem reports against Oomph...


On 03.03.2016 14:19, Steffen Holzer wrote:
> Hi Ed,
> Thank you a thousand times for your patience and help. I solved my
> problems with:
>
> publish the model directly to the update site project in the workspace
> Using the file:// protocoll to address my local files
> Using only unix conform path seperators '/'
> And of course fixing my old product setups
>
> I managed to get my task performed. I feel really dumb by now ^^
> But the debug run of the installer is pretty silent since only really
> grave errors are printed in the log.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:setup tasks not started
Next Topic:How to record for customizing the perspective in Eclipse OOMPH
Goto Forum:
  


Current Time: Fri Apr 26 22:21:51 GMT 2024

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

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

Back to the top