How do I materialize outside the workspace? [message #688280] |
Fri, 24 June 2011 10:31 |
Matthew Webber Messages: 198 Registered: December 2010 |
Senior Member |
|
|
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: How do I materialize outside the workspace? [message #688832 is a reply to message #688280] |
Sat, 25 June 2011 22:47 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
This probably isn't very helpful, but have you considered trying to materialize them to your target platform with a seperate cquery and then simply moving them? Another sort of wacky idea is to use a git provider and a dummy project to trigger the provider. Since git provider clones the whole repos, you'll have that accesible, though of course you're not actually materializing or controlling at all what gets into the git repos directories, you'll just get everything. Probably not what you're looking for.
[Updated on: Sat, 25 June 2011 22:48] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02732 seconds