Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Windows->Linux migration
Windows->Linux migration [message #658615] Wed, 09 March 2011 09:31 Go to next message
Alexander May is currently offline Alexander MayFriend
Messages: 19
Registered: March 2011
Junior Member
Hello everybody,

I am pretty new to Buckminster. Last week I set up all required configurations to move our build form manually building using PDE to automated build with Buckminster on jenkins. So far everything was quite straight forward.

We build an update site containing several plugin/features but no product or RCP application (yet). I expected no serious problems moving the working setup from windows to linux-maschine which is dedicated to become our build-server. Some path-issues needed to be adjusted but after that buckminster was started without errors. importtargetdefinition shows no error and a new target is available in lsttargets after that.

importing CSPEC fails saying:
No suitable provider for component org.eclipse.core.runtime:osgi.bundle was found in resourceMap

Can anyone help me with that? I think for some reason buckminster does not resolve plugins from the target platform.
I currently materialize all required projects from SVN to the workspace using jenkins and reference them in the rmpa locally.

The target platform definitoin is completely chekced out from subversion and present in the workspace. I tried different .target-files referencing the directory by absolute path or even using online sites form eclipse.org, but none of them worked to resolve the required bundles.

Did I miss a step? What is the difference regarding handling of target platform in windows and linux?

My cspec looks as follows:
<?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="com.example.site" componentType="eclipse.feature"/>
</cq:componentQuery>


My rmap looks as follows:
<?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>



Thanks,
Alexander
Re: Windows->Linux migration [message #658637 is a reply to message #658615] Wed, 09 March 2011 10:46 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3229
Registered: July 2009
Senior Member
Hi Alex,

I think your workspace root is an absolute path. Using file:///{0} as a prefix will give you file://// and I don't think
that works.

Try file:{0} or file://{0}

HTH,
- thomas

On 2011-03-09 10:32, Alexander May wrote:
> Hello everybody,
>
> I am pretty new to Buckminster. Last week I set up all required configurations to move our build form manually building
> using PDE to automated build with Buckminster on jenkins. So far everything was quite straight forward.
>
> We build an update site containing several plugin/features but no product or RCP application (yet). I expected no
> serious problems moving the working setup from windows to linux-maschine which is dedicated to become our build-server.
> Some path-issues needed to be adjusted but after that buckminster was started without errors. importtargetdefinition
> shows no error and a new target is available in lsttargets after that.
>
> importing CSPEC fails saying:
> No suitable provider for component org.eclipse.core.runtime:osgi.bundle was found in resourceMap
>
> Can anyone help me with that? I think for some reason buckminster does not resolve plugins from the target platform.
> I currently materialize all required projects from SVN to the workspace using jenkins and reference them in the rmpa
> locally.
>
> The target platform definitoin is completely chekced out from subversion and present in the workspace. I tried different
> .target-files referencing the directory by absolute path or even using online sites form eclipse.org, but none of them
> worked to resolve the required bundles.
>
> Did I miss a step? What is the difference regarding handling of target platform in windows and linux?
>
> My cspec looks as follows:
> <?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="com.example.site" componentType="eclipse.feature"/>
> </cq:componentQuery>
>
> My rmap looks as follows:
> <?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>
>
>
>
> Thanks,
> Alexander
Re: Windows->Linux migration [message #658653 is a reply to message #658637] Wed, 09 March 2011 11:52 Go to previous messageGo to next message
Alexander May is currently offline Alexander MayFriend
Messages: 19
Registered: March 2011
Junior Member
Hi Thomas,

thanks for your advice. Unfortunately it did not help.

I tried several differentnotations in the URI of the resolver but nothing changed in the result.

The problem occurs only with the bundles I expect to be resolved from the target platform (like o.e.*). My own bundles (with sources located in my workspace) are resolved properly.

I did some further investigation and found some other lines in the output that seem stragen to mee:

org.eclipse.core.runtime:osgi.bundle: Using resolver Local resolver
org.eclipse.core.runtime:osgi.bundle: Trying provider local(materialized)
No materialization found for org.eclipse.core.runtime:osgi.bundle
org.eclipse.core.runtime:osgi.bundle: Trying provider local(workspace)
No open workspace project found that corresponds to org.eclipse.core.runtime:osgi.bundle
org.eclipse.core.runtime:osgi.bundle: Trying provider local(target)
org.eclipse.core.runtime:osgi.bundle: Rejecting provider eclipse.platform(plugin/${buckminster.component}): No component match was found


The bundle o.e.c.r is not located in my workspace therfore i think it is correct that the first two providers do not find a match. I expected the third provider to find a match. After that my rmap is used, but this does only resolve to projects located in directories below the workspace.

Any further suggestions?
What I still don't understand completely is the handling of the target platform. Why does the provider local(target) not resolve the eclipse bundles? Can I check the content of the target platform or see wether errors occured during importing of the target platform?

Thanks,
Alexander
Re: Windows->Linux migration [message #658713 is a reply to message #658653] Wed, 09 March 2011 15:25 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3229
Registered: July 2009
Senior Member
The way the RMAP is set up, the resolver currently assumes that you find everything, including all Eclipse bundles,
using a local reader that looks at your workspace root.

Normally, Buckminster will consult the target platform before it consults the RMAP so either your target platform hasn't
been setup correctly, or your CQUERY contains an advisor node to explicitly avoid resolving against the target platform.

- thomas

On 2011-03-09 12:52, Alexander May wrote:
> Hi Thomas,
>
> thanks for your advice. Unfortunately it did not help.
>
> I tried several differentnotations in the URI of the resolver but nothing changed in the result.
>
> The problem occurs only with the bundles I expect to be resolved from the target platform (like o.e.*). My own bundles
> (with sources located in my workspace) are resolved properly.
>
> I did some further investigation and found some other lines in the output that seem stragen to mee:
>
>
> org.eclipse.core.runtime:osgi.bundle: Using resolver Local resolver
> org.eclipse.core.runtime:osgi.bundle: Trying provider local(materialized)
> No materialization found for org.eclipse.core.runtime:osgi.bundle
> org.eclipse.core.runtime:osgi.bundle: Trying provider local(workspace)
> No open workspace project found that corresponds to org.eclipse.core.runtime:osgi.bundle
> org.eclipse.core.runtime:osgi.bundle: Trying provider local(target)
> org.eclipse.core.runtime:osgi.bundle: Rejecting provider eclipse.platform(plugin/${buckminster.component}): No component
> match was found
>
>
> The bundle o.e.c.r is not located in my workspace therfore i think it is correct that the first two providers do not
> find a match. I expected the third provider to find a match. After that my rmap is used, but this does only resolve to
> projects located in directories below the workspace.
>
> Any further suggestions?
> What I still don't understand completely is the handling of the target platform. Why does the provider local(target) not
> resolve the eclipse bundles? Can I check the content of the target platform or see wether errors occured during
> importing of the target platform?
>
> Thanks,
> Alexander
Re: Windows->Linux migration [message #658878 is a reply to message #658713] Thu, 10 March 2011 09:30 Go to previous messageGo to next message
Alexander May is currently offline Alexander MayFriend
Messages: 19
Registered: March 2011
Junior Member
Hi,

I don't use an advisor yet. I currently just want to get the build to work in its simplest form to move on from that.

I think the target platform is consulted by the resolver before the RMAP is used but it does not find the plugin. So I think the target platform setup or import may be the root cause for my problems.

Is there a way I can see what gets imported into the target platform and what is skipped? Even with debugging enabled the only output I get during the import is as follows:
importtargetdefinition '-A' '<correct path to target definition file>'
Doing full workspace refresh
Waiting for jobs to end


Thanks,
Alexander
Re: Windows->Linux migration [message #658894 is a reply to message #658878] Thu, 10 March 2011 10:14 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3229
Registered: July 2009
Senior Member
Hi Alexander,

The importtargetdefinition just calls the PDE import method. Buckminster cannot enhance the logging that takes place
inside of that logic. You can however see what has been imported if you start an IDE on the workspace and open the PDE
preferences.

Alternatively, you can provision the target platform during the Buckminster import. You will then need to add providers
etc. to your rmap to find the bundles (a p2 provider that points to the platform update site is a good start).

- thomas


On 2011-03-10 10:30, Alexander May wrote:
> Hi,
>
> I don't use an advisor yet. I currently just want to get the build to work in its simplest form to move on from that.
>
> I think the target platform is consulted by the resolver before the RMAP is used but it does not find the plugin. So I
> think the target platform setup or import may be the root cause for my problems.
>
> Is there a way I can see what gets imported into the target platform and what is skipped? Even with debugging enabled
> the only output I get during the import is as follows:
>
> importtargetdefinition '-A' '<correct path to target definition file>'
> Doing full workspace refresh
> Waiting for jobs to end
>
>
> Thanks,
> Alexander
Re: Windows->Linux migration [message #658948 is a reply to message #658615] Thu, 10 March 2011 14:38 Go to previous messageGo to next message
Alexander May is currently offline Alexander MayFriend
Messages: 19
Registered: March 2011
Junior Member
Hi Thomas,

thank you for your support. I found out that the target platform is not correctly imported into the workspace (all target platforms shown, when running Eclipse with UI on the workspace are empty).

When I use some directory as target platform (using setpreference targetPlatformPath) the bundles are resolved correctly. But this would mean I had to put the whole plugins of my target platform into subversion. I thought a target platform definition could be easily shared between different developers and the headless buil if it references only online p2 repositories. What is the recomendet way to handle the target platform to be used for headless builds and sharing in the team?

My vision in the mid-term is to use buckminster to setup a single project in svn which contains all buckminster configuration used for developers to setup their environments and control their builds as well as can be used for the headless build. Is that possible with buckminster?
Re: Windows->Linux migration [message #658957 is a reply to message #658948] Thu, 10 March 2011 14:43 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3229
Registered: July 2009
Senior Member
On 2011-03-10 15:38, Alexander May wrote:

> When I use some directory as target platform (using setpreference targetPlatformPath) the bundles are resolved
> correctly. But this would mean I had to put the whole plugins of my target platform into subversion.

Why? Why not use a p2 reader and resolve them from an existing p2 repository?

- thomas
Re: Windows->Linux migration [message #658962 is a reply to message #658615] Thu, 10 March 2011 15:05 Go to previous messageGo to next message
Alexander May is currently offline Alexander MayFriend
Messages: 19
Registered: March 2011
Junior Member
this would still mean I'd need to set up the target platform in some given directory. Where would I put this, with respect to headless and UI-Users? And how would I make it active in the UI automatically?

And I would need to take care about plugin that are removed from the target platform but may still be present in some developers workbench...

Alexander
Re: Windows->Linux migration [message #659717 is a reply to message #658615] Tue, 15 March 2011 10:31 Go to previous message
Alexander May is currently offline Alexander MayFriend
Messages: 19
Registered: March 2011
Junior Member
Thank you,

I finally got a working build. The key was to set up the target platform materialization as a sepperate build which materializes from p2-sites to a local directory.

For the directory I configured an according target definition which I use when testing within the UI and when building headless only targetPlatformPath is used.

Thanks a lot, Buckminster is an awfully usefull tool, once it is set up and integrated in the procedures.

Alexander
Previous Topic:Best practice for RCP project organization
Next Topic:Annotation generated files not included with site.p2 however they are included in bundle.jar
Goto Forum:
  


Current Time: Tue Nov 25 22:21:13 GMT 2014

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

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