Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Projects Build task for a subset of projects
Projects Build task for a subset of projects [message #1733657] Mon, 30 May 2016 18:22 Go to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Hi. Is there a way to specify in a Build Projects task that only a certain subset of projects should be built?

My use case is this: I'm trying to make a setup that builds some EMF models and an Xtext project which depends on the EMF models. To do this I have some MWE2 workflows that invoke the EMF generator for the models and Launch tasks for each of these, as well as a Launch task for the Xtext workflow. Now, before the Xtext Launch task is executed we need to build the EMF models, otherwise the Xtext workflow will fail. I also run another Build Projects task after Xtext.

So we need two Builds, but that task is very time consuming, yet, for the first Build task we only need to build the EMF models and none of the other projects in the workspace. So it would be ideal to be able to specify in the Build task that only these need to be build at this point.


Re: Projects Build task for a subset of projects [message #1733662 is a reply to message #1733657] Mon, 30 May 2016 18:51 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Ernesto,

No, that's currently possible.


On 30.05.2016 20:22, Ernesto Posse wrote:
> Hi. Is there a way to specify in a Build Projects task that only a
> certain subset of projects should be built?
>
> My use case is this: I'm trying to make a setup that builds some EMF
> models and an Xtext project which depends on the EMF models. To do
> this I have some MWE2 workflows that invoke the EMF generator for the
> models and Launch tasks for each of these, as well as a Launch task
> for the Xtext workflow. Now, before the Xtext Launch task is executed
> we need to build the EMF models, otherwise the Xtext workflow will
> fail. I also run another Build Projects task after Xtext.
>
> So we need two Builds, but that task is very time consuming, yet, for
> the first Build task we only need to build the EMF models and none of
> the other projects in the workspace. So it would be ideal to be able
> to specify in the Build task that only these need to be build at this
> point.
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Projects Build task for a subset of projects [message #1733663 is a reply to message #1733662] Mon, 30 May 2016 18:56 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Hi Ed. Sorry I'm confused by your answer. Did you mean to say that is currently *impossible*?
Re: Projects Build task for a subset of projects [message #1733665 is a reply to message #1733663] Mon, 30 May 2016 19:21 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Sorry, it's late here. No, it's *not* currently possible. As you can
see, there's no way in the task to specify which projects to build. But
in principle it should be possible because one can do that in the IDE's
Project menu...


On 30.05.2016 20:56, Ernesto Posse wrote:
> Hi Ed. Sorry I'm confused by your answer. Did you mean to say that is
> currently *impossible*?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Projects Build task for a subset of projects [message #1733699 is a reply to message #1733665] Tue, 31 May 2016 06:41 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Am 30.05.2016 um 21:21 schrieb Ed Merks:<br>
<blockquote cite="mid:nii3s0$874$1@xxxxxxxxe.org" type="cite">Sorry,
it's late here.  No, it's *not* currently possible.  As you can
see, there's no way in the task to specify which projects to
build.  But in principle it should be possible because one can do
that in the IDE's Project menu...
<br>
</blockquote>
I think it *is* possible to specify project predicates:<br>
<br>
<img src="https://www.eclipse.org/forums/index.php?t=getfile&amp;id=26040" alt=""><br>
<br>
Cheers<br>
/Eike<br>
<br>
----<br>
<a class="moz-txt-link-freetext" href="http://www.esc-net.de">http://www.esc-net.de</a><br>
<a class="moz-txt-link-freetext" href="http://thegordian.blogspot.com">http://thegordian.blogspot.com</a><br>
<a class="moz-txt-link-freetext" href="http://twitter.com/eikestepper">http://twitter.com/eikestepper</a><br>
<br>
<br>
</body>
</html>


Re: Projects Build task for a subset of projects [message #1734096 is a reply to message #1733699] Fri, 03 June 2016 17:36 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Thanks Eike.

Where could I find documentation on how and where to specify these predicates?

The link in your message redirects me to a page saying that I followed an invalid link.
Re: Projects Build task for a subset of projects [message #1734097 is a reply to message #1734096] Fri, 03 June 2016 18:12 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 03.06.2016 um 19:36 schrieb Ernesto Posse:
> Thanks Eike.
> Where could I find documentation on how and where to specify these predicates?
We have no documentation for them ;-(

If the meaning is not clear by the name, you'd have to study the source code or ask here.

> The link in your message redirects me to a page saying that I followed an invalid link.
What link?

Cheers
/Eike

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


Re: Projects Build task for a subset of projects [message #1734099 is a reply to message #1734097] Fri, 03 June 2016 18:44 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Ok, I see the predicates now, but it's not clear to me what is the meaning of these predicates. For example, if I use the "Name" predicate, that would specify which projects to build?


Re: Projects Build task for a subset of projects [message #1734113 is a reply to message #1734099] Sat, 04 June 2016 05:03 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 03.06.2016 um 20:44 schrieb Ernesto Posse:
> Ok, I see the predicates now, but it's not clear to me what is the meaning of these predicates. For example, if I use
> the "Name" predicate, that would specify which projects to build?
The ProjectsBuildTask iterates over all projects in the workspace:
http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.setup.projects/src/org/eclipse/oomph/setup/projects/impl/ProjectsBuildTaskImpl.java#n479

All predicates are matched against each project. The NamePredicate compares the project's name against the
NamePredicate's pattern:
http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.predicates/src/org/eclipse/oomph/predicates/impl/NamePredicateImpl.java#n212

Cheers
/Eike

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


Re: Projects Build task for a subset of projects [message #1734292 is a reply to message #1734113] Mon, 06 June 2016 20:06 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Oh, I see, so the pattern is just a regular expression and all projects that match it are built, then, yes?
Re: Projects Build task for a subset of projects [message #1734313 is a reply to message #1734292] Tue, 07 June 2016 04:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Ernesto,

Yes, the predicate is applied to all projects, and it selects all that
match (just as for the working sets task).


On 06.06.2016 22:06, Ernesto Posse wrote:
> Oh, I see, so the pattern is just a regular expression and all
> projects that match it are built, then, yes?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Projects Build task for a subset of projects [message #1736234 is a reply to message #1734113] Mon, 27 June 2016 16:21 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Hi again. Under which conditions will the Projects Build task *not* trigger?

I'm trying to execute a Build Projects by manually triggering the task. I've added a name predicate and I'm certain the projects are in the workspace.

The Pattern in the name predicate is "org\.eclipse\.papyrusrt\..*" (which I think is correct regular expression syntax in Java).

I set the tasks properties of "Refresh", "Clean" and "Build" to true.

Furthermore, the task in question has some predecessor tasks, which I also enabled in the manual tasks, but when launching it I get this:

Performing Projects Build
Nothing to refresh, clean, build


Why is this? What can make the task ignore the predicate and the task's properties?

Thanks
Re: Projects Build task for a subset of projects [message #1736235 is a reply to message #1736234] Mon, 27 June 2016 16:30 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 438
Registered: March 2011
Senior Member
Never mind. I had set "Only New Projects" to true.

Previous Topic:Forced update to Neon: Are you serious?
Next Topic:What could cause additional repository & requirement to be ignored in an existing working model?
Goto Forum:
  


Current Time: Fri Apr 26 15:00:49 GMT 2024

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

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

Back to the top