Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » How can I materialize both: target platform and source code into workspace in one go?
How can I materialize both: target platform and source code into workspace in one go? [message #757207] Thu, 17 November 2011 06:55 Go to next message
Kay Huber is currently offline Kay HuberFriend
Messages: 36
Registered: July 2009
Member
Hi Buckminster community!

I have a question regarding materialization of both: target platform elements and source code projects into the workspace with one cquery/mspec.

According to BuckyBook (Chapter "When is a MSPEC needed" and more precisely "p2 materializer"), the default behaviour when materializing components being source=true or false is almost exactly what I need. I'd like to have components marked with "source=false" to end up in a target platform and "source=true" as source code projects in my Eclipse workspace.
The only thing that bothers me is the selection of the target platform where components are materialized into, as described in "p2 materializer". My application has nothing to do with Eclipse (i.e. it's not an RCP app), it's just using OSGi. Thus, I'd like to have a "plain and empty" target platform to start with and have it filled with components as found in the resolve process. Unfortunately, BuckyBook says it's different: "An automatically created target platform is based on the configuration of the currently running Eclipse instance."

How can I prevent this?

At first, I was thinking, that an mspec instead of a cquery alone may be the way to go. But there it seems only to be possible to have "everything" ending up in a target platform, and not only the source=false components.

Any hints much appreciated.

Thanks and regards
Kay

[Updated on: Thu, 17 November 2011 06:57]

Report message to a moderator

Re: How can I materialize both: target platform and source code into workspace in one go? [message #758016 is a reply to message #757207] Thu, 17 November 2011 07:31 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3232
Registered: July 2009
Senior Member
On 2011-11-17 07:55, Kay Huber wrote:
> Hi Buckminster community!
>
> I have a question regarding materialization of both: target platform elements and source code projects into the
> workspace with one cquery/mspec.
>
> According to BuckyBook (Chapter "When is a MSPEC needed" and more precisely "p2 materializer"), the default behaviour
> when materializing components being source=true or false is almost exactly what I need. I'd like to have components
> marked with "source=false" to end up in a target platform and "source=true" as source code projects in my Eclipse
> workspace.
> The only thing that bothers me is the selection of the target platform where components are materialized into, as
> described in "p2 materializer". My application has nothing to do with Eclipse (i.e. it's not an RCP app), it's just
> using OSGi. Thus, I'd like to have a "plain and empty" target platform to start with and have it filled with components
> as found in the resolve process. Unfortunately, BuckyBook says it's different: "An automatically created target platform
> is based on the configuration of the currently running Eclipse instance."
>
> How can I prevent this?
>
Create an empty target platform manually that contains one single and empty directory. Set this target platform active.
A subsequent resolution/materialization will use that platform.

One easy way to do this headlessly is to do:

buckminster setpref targetPlatformPath=<your target platform folder>

before you resolve the cquery.

HTH,
- thomas
Re: How can I materialize both: target platform and source code into workspace in one go? [message #758093 is a reply to message #758016] Mon, 21 November 2011 21:13 Go to previous messageGo to next message
Kay Huber is currently offline Kay HuberFriend
Messages: 36
Registered: July 2009
Member
> Create an empty target platform manually that contains one single and empty directory. Set this target platform active.
> A subsequent resolution/materialization will use that platform.
>
> One easy way to do this headlessly is to do:
>
> buckminster setpref targetPlatformPath=<your target platform folder>
>
> before you resolve the cquery.

Thanks Thomas

That surely helps. I was hoping to get both steps in one part though. What I like with Buckminster is, that I can give somebody one thing (cquery) and he'll get it all. Actually, when I check http://wiki.eclipse.org/Extending_or_Contributing_to_Buckminster, there are 12 steps about the "create a target platform" and then there are three to actually resolve and materialize buckminster. I prefer to have only the three Wink ... and actually I think the current solution is not far away from it, as it already does what is needed (create a new target platform if there's none active yet, fill in the parts with source=false). The only "flaw" there is, is that the fresh target platform is "prefilled" with the wrong parts. Guessing from your answer I'd say, this is currently not preventable, right?

Is it complicated to change that default behaviour in Buckminster? Can you give me a hint where to start looking in the source?

Regards
Kay
Re: How can I materialize both: target platform and source code into workspace in one go? [message #758157 is a reply to message #758093] Tue, 22 November 2011 07:53 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3232
Registered: July 2009
Senior Member
On 2011-11-21 22:13, Kay Huber wrote:
>> Create an empty target platform manually that contains one single and empty directory. Set this target platform
>> active. A subsequent resolution/materialization will use that platform.
>>
>> One easy way to do this headlessly is to do:
>>
>> buckminster setpref targetPlatformPath=<your target platform folder>
>>
>> before you resolve the cquery.
>
> Thanks Thomas
>
> That surely helps. I was hoping to get both steps in one part though. What I like with Buckminster is, that I can give
> somebody one thing (cquery) and he'll get it all. Actually, when I check
> http://wiki.eclipse.org/Extending_or_Contributing_to_Buckminster, there are 12 steps about the "create a target
> platform"

The one step I proposed above is enough to create an emtpy active target platform. You'll need to make sure that the
folder is empty. So I guess that's two steps.

> and then there are three to actually resolve and materialize buckminster. I prefer to have only the three ;)

Well, the only thing needed once the empty active target platform is present, is to run the cquery import. So there you
have your three steps ;-). The import will build your target platform as well as your workspace.

> Is it complicated to change that default behaviour in Buckminster? Can you give me a hint where to start looking in the
> source?
>
Do you still thing that changing the default behavior is necessary?

- thomas
Re: How can I materialize both: target platform and source code into workspace in one go? [message #758252 is a reply to message #758157] Tue, 22 November 2011 12:51 Go to previous messageGo to next message
Kay Huber is currently offline Kay HuberFriend
Messages: 36
Registered: July 2009
Member
Thanks again Thomas.

>> Is it complicated to change that default behaviour in Buckminster? Can you give me a hint where to start looking in the
>> source?
>>
> Do you still thing that changing the default behavior is necessary?

At this point I guess I'm supposed to say "no, no need for changing it, thanks". Smile

In fact, "changing" was probably not the appropriate wording anyway, "extending it" would have been better. I'm sure, the current behaviour is what most developers using Buckminster would expect.

Anyway, I agree, that the little step to create that empty target platform is reasonable and no big deal at all. It's not a crucial thing nor a must have to have it in Buckminster. It just bugs me, that everything appears to be there, there's just that one thing: the creation of a prefilled target platform instead of optionally an empty one...
Can it really be that hard to have some property that can be set in cquery / rmap / mspec / wherever for the process "create a target platform if there is none" to indicate "... and keep it empty"?

Regards
Kay
Re: How can I materialize both: target platform and source code into workspace in one go? [message #758549 is a reply to message #758252] Wed, 23 November 2011 16:09 Go to previous messageGo to next message
Matthew Webber is currently offline Matthew WebberFriend
Messages: 198
Registered: December 2010
Senior Member
I (as build engineer) created, as a one-off action, an (almost) empty workspace, with just a single project in in, called tp/, which contains just 2 files: .project, and something called dynamic.target, which defines tp/ as the target platform. We make a few other workspace preference change, then zip this up and put it on our web site.

All developers start off by downloading and unzipping this template workspace, then all they need to so is open the CQuery, enter the component name, and resolve. It's even easier than it sounds - we have a little Python script whch does all that (download, unzip, open CQuery, materialize). The script knows, for each version of each product we develop, what CQuery and component name to use.

Part of this process is described at http://www.opengda.org/documentation/manuals/Infrastructure_Guide/trunk/checking_out/new_workspace.html (though that is a little out of date).
Re: How can I materialize both: target platform and source code into workspace in one go? [message #758900 is a reply to message #758549] Fri, 25 November 2011 06:47 Go to previous message
Kay Huber is currently offline Kay HuberFriend
Messages: 36
Registered: July 2009
Member
Thanks Matthew, that sounds very promising. Since we also have some presets to do in the workspace, it's probably best to create a workspace with a predefined (empty) targetplatform.

Thanks for all your hints and advices.

Regards
Kay
Previous Topic:Multiple lauchner exe files
Next Topic:Exclude test classes from jar file
Goto Forum:
  


Current Time: Mon Dec 22 03:34:01 GMT 2014

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

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