How do I materialize outside the workspace? [message #688280] |
Fri, 24 June 2011 06:31  |
Eclipse User |
|
|
|
When materializing a CQuery, by default Buckminster imports source components as projects within the workspace directory, and puts binary components into the target platform (we start off with an empty target platform).
I want a slight variation on this - I want the source components to be checked out to a different location (not the workspace directory, but a different one). After numerous experiments, I have found only one way to do it, and would appreciate any improvements. Let me document what I've found:
(1) Materializing within the workspace is easy. The developer defines an empty target platform and opens a CQuery at at standard URL. The CQuery is set up with the correct advisor nodes and properties. The developer enters a component name, and clicks "resolve and materialize"; all done. The key point hete, though, is that the CQuery can't be run without changing it (this is because we have around 20 similar but not indentical products we build, each of which has its own parent component (everyone uses the same RMap though)).
(2) To materialize outside the workspace, try opening the CQuery, but click "resolve to wizard". Then click "next" and you can enter "global settings" where you can specify a location that is different from the workspace (if you specify a destination type of workspace). This almost works, but the problem is because the settings are indeed global, the binary components that should end up in the target platform directory, end up in the location instead (at least, the first time I tried it; after that I just got a bunch of exceptions thrown by Buckminster).
(3) The only way I was able to redirect just the source components to another directory was to define an mspec like this:
<mspec:mspec xmlns:bc="blah" xmlns:mspec="blah" installLocation="" workspace
Location="" name="item-mspec" shortDesc="MSpec pointing to item.cquery" url="http://server/item.cquery">
<mspec:propertyElement key="component">
<bc:constant value="example-config"/>
</mspec:propertyElement>
<mspec:propertyElement key="location.root">
<bc:constant value="/scratch/test-loc"/>
</mspec:propertyElement>
<mspec:mspecNode installLocation="${location.root}" materializer="workspace" workspaceLocation="${workspace.root}" bindingNamePattern=".*" filter="(buckminster.source=true)"/>
</mspec:mspec>
The property called component is there so that in the CQuery I can have a component name of ${component} which will then get substituted.
This works, but lacks the elegance of using a CQuery. With a CQuery, you can specify a URL and a local copy is opened in the workspace, and you can edit it. That doesn't work for an MSpec. All you can do with a http:// MSpec is materialize it. If you have to change it (eg to change the component key in our case), you must make a local copy manually and then edit it. Which means that the url in the MSpec must be absolute; you can't have a relative location (unless you also manually download the CQuery).
OK, all doable, but I've lost my simple "open a URL, enter componet name, click" to materialize a workspace.
I hope this doesn't sound like too much of a winge, I'm just looking for a cleaner solution. Any ideas?
Thanks
Matthew
|
|
|
|
|
Re: (no subject) [message #689694 is a reply to message #688862] |
Tue, 28 June 2011 03:49  |
Eclipse User |
|
|
|
Thanks for those ideas Henrik.
Althogh developing a wizard is possible, it would then need to be installed into the developers' Eclipse, which adds an additional step - which is what I'm trying to avoid.
The idea of handling it at the server end (by adding a servlet) is a rather a nice and natural solution, so I'll look at that.
Matthew
|
|
|
Powered by
FUDForum. Page generated in 0.03820 seconds