Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » How to tell buckminster to build from a concrete plugin
How to tell buckminster to build from a concrete plugin [message #909706] Fri, 07 September 2012 16:17 Go to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

I have a target platform containing many bundles. One of that bundle is modified and stored on my file system. How can I tell the Buckminster to use this one instead of the original from the target platform?

My site.rmap file:
<?xml version="1.0" encoding="UTF-8"?>
<rmap
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.eclipse.org/buckminster/RMap-1.0"
    xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
    xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0"
    xmlns:pp="http://www.eclipse.org/buckminster/PDEMapProvider-1.0">

    <searchPath name="resources">
        <provider readerType="local" componentTypes="osgi.bundle,eclipse.feature"
                  mutable="true" source="true">
            <uri format="file:///{0}/{1}/">
                <bc:propertyRef key="workspace.root" />
                <bc:propertyRef key="buckminster.component" />
            </uri>
        </provider>
    </searchPath>

    <locator searchPathRef="resources"/>
</rmap>


My cquery"
<?xml version="1.0" encoding="UTF-8"?>
<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="site.rmap">
    <cq:rootRequest name="cz.tigra.spl.site" componentType="eclipse.feature"/>
    <cq:advisorNode namePattern="cz.tigra.spl*" componentType="osgi.bundle" allowCircularDependency="true"/>
    <cq:advisorNode namePattern="cz.tigra.spl.client.feature" componentType="eclipse.feature" allowCircularDependency="true"/>
</cq:componentQuery>


Thanks
Re: How to tell buckminster to build from a concrete plugin [message #910727 is a reply to message #909706] Mon, 10 September 2012 09:33 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3232
Registered: July 2009
Senior Member
Hi Jan,

You can add an advisorNode to you cquery so that it will instruct Bucky to disregard the target platform during
resolution. Put this one last to "catch-all":

<cq:advisorNode namePattern=".*" useTargetPlatform="false" useMaterialization="false"/>

and then alter the existing nodes and add useTargetPlatform="false" useMaterialization="false" to them too (there's no
merging of advisornodes, the first one to match a component is used).

HTH,
- thomas


On 2012-09-07 18:17, Jan Krakora wrote:
> Hi,
>
> I have a target platform containing many bundles. One of that bundle is modified and stored on my file system. How can I
> tell the Buckminster to use this one instead of the original from the target platform?
>
> My site.rmap file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <rmap
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://www.eclipse.org/buckminster/RMap-1.0"
> xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
> xmlns:mp="http://www.eclipse.org/buckminster/MavenProvider-1.0"
> xmlns:pp="http://www.eclipse.org/buckminster/PDEMapProvider-1.0">
>
> <searchPath name="resources">
> <provider readerType="local" componentTypes="osgi.bundle,eclipse.feature"
> mutable="true" source="true">
> <uri format="file:///{0}/{1}/">
> <bc:propertyRef key="workspace.root" />
> <bc:propertyRef key="buckminster.component" />
> </uri>
> </provider>
> </searchPath>
>
> <locator searchPathRef="resources"/>
> </rmap>
>
>
> My cquery"
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="site.rmap">
> <cq:rootRequest name="cz.tigra.spl.site" componentType="eclipse.feature"/>
> <cq:advisorNode namePattern="cz.tigra.spl*" componentType="osgi.bundle" allowCircularDependency="true"/>
> <cq:advisorNode namePattern="cz.tigra.spl.client.feature" componentType="eclipse.feature"
> allowCircularDependency="true"/>
> </cq:componentQuery>
>
>
> Thanks
Re: How to tell buckminster to build from a concrete plugin [message #910768 is a reply to message #910727] Mon, 10 September 2012 11:20 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi Thomas,

thanks for your response.

1) Why is there useMaterialization="false"?

2) I use headless Buckminster, when I call buckminster import ".../bucminster.cquery" it resolves and materializes the required components to the workspace, right?
So the cquery is used for materialization. And then, when I call buckminster perform "some build action", it operates on the materialized components.
Does it mean that the buckminster's workspace is always regenerated when it's materialized?
Re: How to tell buckminster to build from a concrete plugin [message #910801 is a reply to message #910768] Mon, 10 September 2012 12:08 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3232
Registered: July 2009
Senior Member
On 2012-09-10 13:20, Jan Krakora wrote:
> Hi Thomas,
>
> thanks for your response.
> 1) Why is there useMaterialization="false"?
>
Because only p2 aware components will end up in your target platform. Components fetched from Maven or using URL's will
end up in a special project called .buckminster. You can also use an mspec to make them end up elsewhere. Those
components are considered materialized (and can thus be found) although they are not in your TP. If you want to force
buckminster to bypass the and search the net during resolution, then you must use userMaterialization="false".

> 2) I use headless Buckminster, when I call buckminster import ".../bucminster.cquery" it resolves and materializes the
> required components to the workspace, right?
> So the cquery is used for materialization. And then, when I call buckminster perform "some build action", it operates on
> the materialized components. Does it mean that the buckminster's workspace is always regenerated when it's materialized?

No, not unless you use useWorkspace="false" in your cquery. That would force Buckminster to regenerate the workspace. I
would recommend starting with an empty workspace instead when running unattended build. In your IDE, you generally
"regenerate" your workspace using other means such as "git pull" or "svn update".

- thomas
Re: How to tell buckminster to build from a concrete plugin [message #910868 is a reply to message #910801] Mon, 10 September 2012 14:33 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Ok, just the last question.

I have about 20 plugin projects stored on a local file system. They are fetched by local reader using RMAP.

I invoke an ant action creating p2.site from a feature (it contains many plugins from target platform and also those 20 plugins)
and then an action creating product from that site.

The product contains all required plugins, but there is one source plugin for one of those 20 from local file system.
Why is that? There are about 100 plugins (20 from local file system, 80 from target platform) and none of them has there its source, but the one.

It's just a normal plugin project like the others.

Do you have any idea???

Thanks
Re: How to tell buckminster to build from a concrete plugin [message #910892 is a reply to message #910868] Mon, 10 September 2012 15:13 Go to previous message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3232
Registered: July 2009
Senior Member
On 2012-09-10 16:33, Jan Krakora wrote:
> Ok, just the last question.
>
> I have about 20 plugin projects stored on a local file system. They are fetched by local reader using RMAP.
>
> I invoke an ant action creating p2.site from a feature (it contains many plugins from target platform and also those 20
> plugins) and then an action creating product from that site.
>
> The product contains all required plugins, but there is one source plugin for one of those 20 from local file system.
> Why is that? There are about 100 plugins (20 from local file system, 80 from target platform) and none of them has there
> its source, but the one.
>
> It's just a normal plugin project like the others.
>
> Do you have any idea???
>
Sorry, but no. I would need to look at more details.

- thomas
Previous Topic:Source feature generation broken?
Next Topic:Buckminster - How to proceed
Goto Forum:
  


Current Time: Sun Dec 21 10:52:42 GMT 2014

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

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