Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Oomph headless
Oomph headless [message #1387033] Mon, 23 June 2014 15:23 Go to next message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 43
Registered: September 2010
Location: France
Member
Hi,

Is it possible to launch Oomph as a headless application ? If it is, which APIs allow to do that ?

Best regards,

Axel


Axel Richard
Obeo
Re: Oomph headless [message #1387037 is a reply to message #1387033] Mon, 23 June 2014 16:13 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Axel,

In theory it should be possible because we've just fully separated Core and UI, but we haven't developed a headless
installer application. Hence we've never tested that it really already works. If you're interested to help that would
make a nice contribution ;-)

Cheers
/Eike

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


Am 23.06.2014 17:23, schrieb Axel RICHARD:
> Hi,
>
> Is it possible to launch Oomph as a headless application ? If it is, which APIs allow to do that ?
>
> Best regards,
> Axel


Re: Oomph headless [message #1387039 is a reply to message #1387033] Mon, 23 June 2014 16:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Axel,

It's certainly possible in principle, but we've not looked at providing
such an application. What are you hoping to achieve? (Certainly all the
things you'd normally have to specify in the installer wizard would need
to be specified as arguments to the application.)


On 23/06/2014 5:23 PM, Axel RICHARD wrote:
> Hi,
>
> Is it possible to launch Oomph as a headless application ? If it is,
> which APIs allow to do that ?
>
> Best regards,
> Axel


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph headless [message #1387105 is a reply to message #1387039] Tue, 24 June 2014 07:25 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 43
Registered: September 2010
Location: France
Member
Ed,

As part of EMF Compare, we want to provide a headless application in order to do merge opertions on models with (j)git. For that reason, we need a mechanism to provision a worksapce and an eclipse environment, and Oomph seems to fit this need.

Axel


Axel Richard
Obeo
Re: Oomph headless [message #1387109 is a reply to message #1387105] Tue, 24 June 2014 08:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Axel,

I see, so it would be a headless application that includes
org.eclipse.core.resources, i.e., that includes workspace support. I see
no reason, in principle, why this wouldn't work well. Do you want to
help design such an application? Without your help, it will likely be a
few weeks before we'd have time to look at it...


On 24/06/2014 9:25 AM, Axel RICHARD wrote:
> Ed,
>
> As part of EMF Compare, we want to provide a headless application in
> order to do merge opertions on models with (j)git. For that reason, we
> need a mechanism to provision a worksapce and an eclipse environment,
> and Oomph seems to fit this need.
>
> Axel


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph headless [message #1392344 is a reply to message #1387109] Wed, 02 July 2014 07:30 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 43
Registered: September 2010
Location: France
Member
Hi,

With Oomph, there is bootstrap tasks and startup tasks. Once bootstrap tasks have been executed, you can launch the provisionned environment. When this environment is launched, Oomph is automatically launched to execute startup tasks (e.g. clone a repo, imports projects...).
I succeed in programmatically provision an eclipse environment with oomph.
But I don't find the code that allows to execute the startup tasks in this provisionned environment.

Can you help me about that ?

Thanks,


Axel Richard
Obeo
Re: Oomph headless [message #1392463 is a reply to message #1392344] Wed, 02 July 2014 11:25 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Axel,

Comments below...

Cheers
/Eike

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


Am 02.07.2014 09:30, schrieb Axel RICHARD:
> Hi,
>
> With Oomph, there is bootstrap tasks and startup tasks.
Knitpicking a bit, the list of tasks that you see for the bootstrap trigger and the list of tasks you see for the
startup trigger is not necessarily disjunct; or in other words, a task can be both a bootstrap and a startup task.

> Once bootstrap tasks have been executed, you can launch the provisionned environment. When this environment is
> launched, Oomph is automatically launched to execute startup tasks (e.g. clone a repo, imports projects...).
> I succeed in programmatically provision an eclipse environment with oomph. But I don't find the code that allows to
> execute the startup tasks in this provisionned environment.
That code is in org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup().

This method should be automatically called when the org.eclipse.oomph.setup.ui plugin is started, which happens early.
So I wonder why that doesn't happen in your case.


Re: Oomph headless [message #1392567 is a reply to message #1392463] Wed, 02 July 2014 14:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Guys,

It's important to set properties in the eclipse.ini, in particular
-Doomph.setup=true


On 02/07/2014 1:25 PM, Eike Stepper wrote:
> Hi Axel,
>
> Comments below...
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
> Am 02.07.2014 09:30, schrieb Axel RICHARD:
>> Hi,
>>
>> With Oomph, there is bootstrap tasks and startup tasks.
> Knitpicking a bit, the list of tasks that you see for the bootstrap
> trigger and the list of tasks you see for the startup trigger is not
> necessarily disjunct; or in other words, a task can be both a
> bootstrap and a startup task.
>
>> Once bootstrap tasks have been executed, you can launch the
>> provisionned environment. When this environment is launched, Oomph is
>> automatically launched to execute startup tasks (e.g. clone a repo,
>> imports projects...).
>> I succeed in programmatically provision an eclipse environment with
>> oomph. But I don't find the code that allows to execute the startup
>> tasks in this provisionned environment.
> That code is in
> org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup().
>
> This method should be automatically called when the
> org.eclipse.oomph.setup.ui plugin is started, which happens early. So
> I wonder why that doesn't happen in your case.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph headless [message #1393897 is a reply to message #1392567] Fri, 04 July 2014 12:46 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 43
Registered: September 2010
Location: France
Member
Hi guys,

Thanks for your prompt answers, still progress on executing oomph headless.
I succeed in programmatically provision an eclipse environment with oomph.
I succeed in execute my startup tasks in this provisionned environment.

Now, I don't understand why the plugin org.eclipse.oomph.setup.ui is included in the feature org.eclipse.oomph.setup-feature ?

In the perform(SetupTaskContext) method of GitCloneTaskImpl, I found this:

// Force start egit to make the clone appears in the repositories view and so projects are connected by the egit team provider.
CommonPlugin.loadClass("org.eclipse.egit.ui", "org.eclipse.egit.ui.Activator");

But, in my case, that is to say a headless context, I don't want org.eclipse.egit.ui.

Do you plan to remove org.eclipse.oomph.setup.ui from the org.eclipse.oomph.setup-feature ? Or do you know a workaround ?

Best regards,


Axel Richard
Obeo

[Updated on: Fri, 04 July 2014 12:47]

Report message to a moderator

Re: Oomph headless [message #1394375 is a reply to message #1393897] Sat, 05 July 2014 06:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Axel,

Comments below.

On 04/07/2014 2:46 PM, Axel RICHARD wrote:
> Hi guys,
>
> Thanks for your prompt answers, still progress on executing oomph
> headless.
> I succeed in programmatically provision an eclipse environment with
> oomph. I succeed in execute my startup tasks in this provisionned
> environment.
>
> Now, I don't understand why the plugin org.eclipse.oomph.setup.ui is
> included in the feature org.eclipse.oomph.setup-feature ?
That's maybe bogus. Please open a bugzilla and we'll review.
>
> In the perform(SetupTaskContext) method of GitCloneTaskImpl, I found
> this:
>
> // Force start egit to make the clone appears in the repositories view
> and so projects are connected by the egit team provider.
> CommonPlugin.loadClass("org.eclipse.egit.ui",
> "org.eclipse.egit.ui.Activator");
>
> But, in my case, that is to say a headless context, I don't want
> org.eclipse.egit.ui.
> Do you plan to remove org.eclipse.oomph.setup.ui from the
> org.eclipse.oomph-feature ?
I'm not sure the two things are related. Certainly we should change the
GitCloneTaskImpl so it guards the loadClass call. We only call that
because the EGit UI plugin needs to be enabled for projects to actually
be imported into the workspace and for clones to be added to the clones
view. That plugins where the auto import support comes from. Perhaps
that is a bogus aspect of EGit because, i.e., why shouldn't you be able
to auto import projects headlessly?

Or maybe we shouldn't be relying on auto import in the targlet task...
> Or do you know a workaround ?
Will you rely on projects actually ending up in the workspace?
>
> Best regards,
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph headless [message #1395664 is a reply to message #1394375] Mon, 07 July 2014 08:07 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 43
Registered: September 2010
Location: France
Member
Ed,

I try to import a simple eclipse project stored in a git repository into an eclipse luna. I import the project with Import > General > Existing Projects into Workspace (not from the Git Repositories view nor Import > Git > Projects from Git), so I didn't use EGit. As a result, the imported project is shown as connected the the repository in the Package Explorer, and the Git Repositories view of the Git Perspective displays the repository.
So I believe GitCloneTaskImpl doesn't need to load egit.ui. Just import projects, and the repositories associated to these projects will be display in the Git repostories view.

I raised two bugs.

The first one is https://bugs.eclipse.org/bugs/show_bug.cgi?id=438991 to remove the org.eclipse.oomph.setup.ui plugin from the org.eclipse.oomph-feature.
The second one is https://bugs.eclipse.org/bugs/show_bug.cgi?id=438993 to remove the load of org.eclipse.egit.ui.Activator from GitCloneTaskImpl.

Best regards,


Axel Richard
Obeo
Re: Oomph headless [message #1413835 is a reply to message #1395664] Fri, 29 August 2014 14:44 Go to previous messageGo to next message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 43
Registered: September 2010
Location: France
Member
Ed, Eike,

Some news of our need with EMF Compare. We succeed in using Oomph as a headless application, and I would thank you for this great tool you've made.
As a reminder we want to provide a headless application in order to do specific git operations (diff, merge) on models with (j)git. For that reason, we use Oomph to provision an eclipse environment.
When a user wants to compare or merge EMF models from a command line, he needs to do that in an Eclipse environment similar to the one he used to create these models. As such, the environment requires some plugins to be installed but it may also requires some preferences to be set, some perspective to be activated etc... Among these plugins, there are the mandatory ones that will be use to do the git operation.
First, Oomph provision an Eclipse with all appropriate plugins to launch the git operation. These plugins are EGit, EMF Compare and their dependencies. If the user setup model provided as parameter of the git command contains other plugins, they will be provisioned too.
For a given Oomph setup model file, the provisioning operation is executed only once. Indeed, if you launch again a git logical operation with the same Oomph setup model file, then the already provisioned Eclipse IDE corresponding to the setup model will be reused. It avoids to execute this potentially costly task each time.
Then, in this provisioned Eclipse, the list of tasks contained in the user setup model are executed.
Once all Oomph tasks executed, EMF Compare calls the logical git operation with the others parameters provided in the command line interface. Once the git logical operation has been executed, the user can see the results in his command line tool.
Here is a review of our code that use Oomph as a headless application: https://git.eclipse.org/r/#/c/30733/
If you're interested, feel free to give us your opinion about the use of Oomph in this review.

Best regards,


Axel Richard
Obeo
Re: Oomph headless [message #1417424 is a reply to message #1413835] Fri, 05 September 2014 11:53 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Axel,

I've looked at that review briefly and noticed that it includes many many files. I'm sorry but it seems beyond what I
can achieve in a short time frame. If you have specific questions please don't hesitate to ask ;-)

Cheers
/Eike

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



Am 29.08.2014 um 16:44 schrieb Axel RICHARD:
> Ed, Eike,
>
> Some news of our need with EMF Compare. We succeed in using Oomph as a headless application, and I would thank you for
> this great tool you've made.
> As a reminder we want to provide a headless application in order to do specific git operations (diff, merge) on models
> with (j)git. For that reason, we use Oomph to provision an eclipse environment.
> When a user wants to compare or merge EMF models from a command line, he needs to do that in an Eclipse environment
> similar to the one he used to create these models. As such, the environment requires some plugins to be installed but
> it may also requires some preferences to be set, some perspective to be activated etc... Among these plugins, there
> are the mandatory ones that will be use to do the git operation.
> First, Oomph provision an Eclipse with all appropriate plugins to launch the git operation. These plugins are EGit,
> EMF Compare and their dependencies. If the user setup model provided as parameter of the git command contains other
> plugins, they will be provisioned too.
> For a given Oomph setup model file, the provisioning operation is executed only once. Indeed, if you launch again a
> git logical operation with the same Oomph setup model file, then the already provisioned Eclipse IDE corresponding to
> the setup model will be reused. It avoids to execute this potentially costly task each time.
> Then, in this provisioned Eclipse, the list of tasks contained in the user setup model are executed.
> Once all Oomph tasks executed, EMF Compare calls the logical git operation with the others parameters provided in the
> command line interface. Once the git logical operation has been executed, the user can see the results in his command
> line tool.
> Here is a review of our code that use Oomph as a headless application: https://git.eclipse.org/r/#/c/30733/
> If you're interested, feel free to give us your opinion about the use of Oomph in this review.
>
> Best regards,


Re: Oomph headless [message #1506431 is a reply to message #1387033] Wed, 10 December 2014 21:22 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi Eike and Ed,

I'd like to have an headless application to start oomph against 1..n setupfiles you can configure as parameter and which setups up a new eclipse installation or updates an already existing one which can also be parameterized by a second parameter

I have searched if oomph can already be executed as headless application and found this thread. Can you please give me a hint, if you have anything concrete to use or if an bugzilla entry or something else already exists, because I could imagine to contribute such a feature.

If not already implemented, what would you expect from such an headless application?

By the way....
I tried to clone git clone https://git.eclipse.org/r/oomph/org.eclipse.oomph and build it with mvn compile, but if fails:

Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.21.0:validate-version (default-validate-version) on project org.eclipse.oomph.gitbash: OSGi version 1.0.0.SNAPSHOT must have .qualifier qualifier for SNAPSHOT builds -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]


Can you give me a hint what's wrong here?


Thanks in advance

Cheers
Markus

[Updated on: Wed, 10 December 2014 22:06]

Report message to a moderator

Re: Oomph headless [message #1506874 is a reply to message #1506431] Thu, 11 December 2014 06:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Markus,

You'd really need to look at what the EMF compare folks have done
because we've done nothing along this line in Oomph. We've just ensured
minimal/optional dependencies allow the infrastracture to be used
headless, not designed any specific headless applications. It seems to
me one could write many different headless applications depending what
you'd like to be parameterized and what you'd like the application to do
with those parameters. One application I can imagine is something that
parameterizes all the interactions that are available in the installer
dialog...


On 10/12/2014 10:22 PM, Markus Oley wrote:
> Hi Eike and Ed,
> I'd like to have an headless application to start oomph against 1..n
> setupfiles you can configure as parameter and which setups up a new
> eclipse installation or updates an already existing one which can also
> be parameterized by a second parameter
>
> I have searched if oomph can already be executed as headless
> application and found this thread. Can you please give me a hint, if
> you have anything concrete to use or if an bugzilla entry or something
> else already exists, because I could imagine to contribute such a
> feature.
> If not already implemented, what would you expect from such an
> headless application?
> Thanks in advance
>
> Cheers
> Markus


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph headless [message #1508177 is a reply to message #1506874] Fri, 12 December 2014 07:13 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi Ed,

thank you for you answer,
I had a look at the contribution and as I can see from my point of view the emf compare folk have implemented a headless application which has some git actions and needs oomph to setup the workspace properly. This is not exactly the thing I need, but it's a very good example, where I can see how I can implement a real headless application. Thank you.

So I want to try to implement an headless application where I can parameterize a folder where to setup the configurations and parameterize a bunch of files to get the info what I want to setup. I think this is a very general way and you do not have to add additional functionality to parameter handling if oomph actions are extended theirselfes.

I could imagine to contribute this, so can you give me a hint, if I should implement in oomph git and contribute it as pull request? Or should I go another way? I'm new in the whole process of contributing.

Thanks in advance

Cheers
Markus
Re: Oomph headless [message #1508207 is a reply to message #1508177] Fri, 12 December 2014 07:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Markus,

Comments below.

On 12/12/2014 8:13 AM, Markus Oley wrote:
> Hi Ed,
> thank you for you answer, I had a look at the contribution and as I
> can see from my point of view the emf compare folk have implemented a
> headless application which has some git actions and needs oomph to
> setup the workspace properly. This is not exactly the thing I need,
> but it's a very good example, where I can see how I can implement a
> real headless application. Thank you.
> So I want to try to implement an headless application where I can
> parameterize a folder where to setup the configurations and
> parameterize a bunch of files to get the info what I want to setup. I
> think this is a very general way and you do not have to add additional
> functionality to parameter handling if oomph actions are extended
> theirselfes.
I think I see what you mean. Sort of a
descriptor/template/configuration-file for what needs to be done, rather
than 50 different command line parameters.
> I could imagine to contribute this, so can you give me a hint, if I
> should implement in oomph git and contribute it as pull request?
If you provision an IDE with the Oomph.setup itself, and you choose
Gerrit for the repository URI, you will be able to commit to Gerrit
where we can do an interactive reviews; of course you'll need a Gerrit
account, but that's trivial.
> Or should I go another way? I'm new in the whole process of contributing.
That's one of the goals of Oomph: to make it easy to contribute to
projects. I.e., instead of forcing contributors to spend hours or a
full day setting up an environment, this aspect is automated so
contributors can focus on contribution, not administration.
> Thanks in advance
>
> Cheers
> Markus


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph headless [message #1508543 is a reply to message #1508207] Fri, 12 December 2014 13:58 Go to previous message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member

I think I see what you mean. Sort of a
descriptor/template/configuration-file for what needs to be done, rather
than 50 different command line parameters.

-> Yes, that's the point.

That's one of the goals of Oomph: to make it easy to contribute to
projects. I.e., instead of forcing contributors to spend hours or a
full day setting up an environment, this aspect is automated so
contributors can focus on contribution, not administration.


-> OK, thank you, I will give it a try and 'll be back if I have something to see.

Have a nice weekend,
Cheers
Markus
Previous Topic:Add (second) remote to git repository
Next Topic:workspace when skipping project selection
Goto Forum:
  


Current Time: Fri Mar 29 14:19:42 GMT 2024

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

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

Back to the top