Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » create a site.p2 from the target platform
create a site.p2 from the target platform [message #969943] Sat, 03 November 2012 17:57 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

I was trying to use the technique shown here
https://nirmalsasidharan.wordpress.com/2010/10/09/provisioning-your-target-platform-as-local-p2-site/
to create a site.p2 (with Buckminster of course) from a target
definition file.

Basically the target definition is

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>

<target name="juno" sequenceNumber="1">
<locations>
<location includeAllPlatforms="true" includeConfigurePhase="true"
includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.equinox.executable.feature.group"
version="3.6.0.v20120522-1813-7P7OG2BFLWUl7UmbVUO9iCm"/>
<unit id="org.eclipse.rcp.sdk.id" version="4.2.1.M20120914-1800"/>
<unit id="org.eclipse.emf.ecoretools.sdk.feature.group"
version="1.1.0.201205150811"/>
<unit id="org.eclipse.emf.sdk.feature.group"
version="2.8.1.v20120917-0436"/>
<repository location="http://download.eclipse.org/releases/juno"/>
</location>
</locations>
</target>

and then I create a target.feature project initialized with all the
plugins available in the target.

However, when I run site.p2 on this target.feature project it soon
complains about

No component named org.apache.ant:osgi.bundle/[1.7.0,2.0.0) is known to
Buckminster

which actually is not in the target platform (and probably needed by
some of the bundles in the target platform?)

so I was wondering: is there a way to create a p2 site from a target
definition with Buckminster?

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #970718 is a reply to message #969943] Sun, 04 November 2012 08:26 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Lorenzo,

On 2012-11-03 18:57, Lorenzo Bettini wrote:
> However, when I run site.p2 on this target.feature project it soon
> complains about
>
> No component named org.apache.ant:osgi.bundle/[1.7.0,2.0.0) is known to
> Buckminster
>
> which actually is not in the target platform (and probably needed by
> some of the bundles in the target platform?)
>
> so I was wondering: is there a way to create a p2 site from a target
> definition with Buckminster?
>
The simplest way is probably to let Buckminster create the target
platform using a normal resolve/materialize based on the target feature.
That way, the TP will contain everything that is needed and you won't
even need the target platform definition.

If you for some reason have to use the target definition, then
Buckminster must be able to find the missing pieces somewhere and
complement the TP. You can achieve this by adding an empty directory
container to the TP and then run a resolve/materialize on the target
feature. Buckminster will then use what's already in the TP and add
what's missing to the added container.

- thomas
Re: create a site.p2 from the target platform [message #970758 is a reply to message #970718] Sun, 04 November 2012 09:10 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/04/2012 09:26 AM, Thomas Hallgren wrote:
> Hi Lorenzo,
>
> On 2012-11-03 18:57, Lorenzo Bettini wrote:
>> However, when I run site.p2 on this target.feature project it soon
>> complains about
>>
>> No component named org.apache.ant:osgi.bundle/[1.7.0,2.0.0) is known to
>> Buckminster
>>
>> which actually is not in the target platform (and probably needed by
>> some of the bundles in the target platform?)
>>
>> so I was wondering: is there a way to create a p2 site from a target
>> definition with Buckminster?
>>

Hi Thomas

> The simplest way is probably to let Buckminster create the target
> platform using a normal resolve/materialize based on the target feature.
> That way, the TP will contain everything that is needed and you won't
> even need the target platform definition.
>

Do you mean to have a TP defined through a cspec, cquery and rmap
instead of defining a .target file?

or something else?

thanks in advance
Lorenzo

> If you for some reason have to use the target definition, then
> Buckminster must be able to find the missing pieces somewhere and
> complement the TP. You can achieve this by adding an empty directory
> container to the TP and then run a resolve/materialize on the target
> feature. Buckminster will then use what's already in the TP and add
> what's missing to the added container.
>
> - thomas
>


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #971273 is a reply to message #970758] Sun, 04 November 2012 19:06 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Probably I understood what you meant... I shared an example here

https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster

cheers
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #971893 is a reply to message #971273] Mon, 05 November 2012 07:32 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2012-11-04 20:06, Lorenzo Bettini wrote:
> Probably I understood what you meant... I shared an example here
>
> https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster
>
You did indeed. Great example!

Thanks,
- thomas

> cheers
> Lorenzo
>
>
Re: create a site.p2 from the target platform [message #972157 is a reply to message #971893] Mon, 05 November 2012 11:53 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/05/2012 08:32 AM, Thomas Hallgren wrote:
> On 2012-11-04 20:06, Lorenzo Bettini wrote:
>> Probably I understood what you meant... I shared an example here
>>
>> https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster
>>
> You did indeed. Great example!
>

Thanks!
I have a small problem when I try to build the p2 with Jenkins (I don't
have these problems when building in the IDE): although the platform is
resolved correctly with

resolve 'bucky.example.rcpemf.target/target-platform.cquery'

I get these errors when I try to resolve the target.site feature:

ERROR [0002] : No suitable provider for component
org.eclipse.equinox.launcher.gtk.linux.ppc64:osgi.bundle was found in
resourceMap
file:/usr/share/tomcat6/.jenkins/workspace/Buckminster-Target-p2/bucky.example.rcpemf.target/project.rmap
ERROR [0002] : Unable to find a searchPath for
org.eclipse.equinox.launcher.gtk.linux.ppc64:osgi.bundle
ERROR [0002] : No suitable provider for component
org.eclipse.equinox.launcher.cocoa.macosx:osgi.bundle was found in
resourceMap
file:/usr/share/tomcat6/.jenkins/workspace/Buckminster-Target-p2/bucky.example.rcpemf.target/project.rmap
....

where project.rmap is simply

<?xml version="1.0" encoding="UTF-8"?>
<rm:rmap xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0">
<rm:property key="projects.location" value="${workspace.root}"/>
<rm:locator pattern="^bucky.example.rcpemf(?:\..+)?$"
searchPathRef="project"/>
<rm:searchPath name="project">
<rm:provider
componentTypes="eclipse.feature,osgi.bundle,buckminster"
readerType="local" mutable="false">
<rm:property key="buckminster.mutable" value="false"/>
<rm:uri format="{0}/{1}">
<bc:propertyRef key="projects.location"/>
<bc:propertyRef key="buckminster.component"/>
</rm:uri>
</rm:provider>
</rm:searchPath>
</rm:rmap>

the problems are due to the equinox.launcher fragments (I think they are
fragments)...

these fragments are included in the target.site/feature.xml

they are in the target platform, so why can't they be resolved?
I probably remove these fragments from the feature.xml, but I was
wondering why they cannot be resolved...

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #972213 is a reply to message #972157] Mon, 05 November 2012 12:48 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2012-11-05 12:53, Lorenzo Bettini wrote:

> the problems are due to the equinox.launcher fragments (I think they are
> fragments)...
>
> these fragments are included in the target.site/feature.xml
>
> they are in the target platform, so why can't they be resolved?
> I probably remove these fragments from the feature.xml, but I was
> wondering why they cannot be resolved...
>
Not sure why this happens. Do you create the original TP from Juno or
from the Eclipse platfrom repository? I ask because IIRC some of the
launcher fragments are not present in Juno.

- thomas
Re: create a site.p2 from the target platform [message #972242 is a reply to message #972213] Mon, 05 November 2012 13:15 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/05/2012 01:48 PM, Thomas Hallgren wrote:
> On 2012-11-05 12:53, Lorenzo Bettini wrote:
>
>> the problems are due to the equinox.launcher fragments (I think they are
>> fragments)...
>>
>> these fragments are included in the target.site/feature.xml
>>
>> they are in the target platform, so why can't they be resolved?
>> I probably remove these fragments from the feature.xml, but I was
>> wondering why they cannot be resolved...
>>
> Not sure why this happens. Do you create the original TP from Juno or
> from the Eclipse platfrom repository? I ask because IIRC some of the
> launcher fragments are not present in Juno.

Hi Thomas

I'm using

http://download.eclipse.org/releases/juno

(see
https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster/blob/master/bucky.example.rcpemf.target/target-platform.rmap)
however, the strange thing is that in the target platform generated by
the jenkins job the fragments are there, e.g.,

ls
..buckminster/tp/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813/META-INF/

eclipse.inf ECLIPSE_.RSA ECLIPSE_.SF MANIFEST.MF

but they cannot be resolved when performing site.p2 on the feature.xml...

most of all, I'm experiencing another critical problem:

I was using the cquery, rmap mechanism for defining the target platform
because, from what I understand, it allows me to have a target for
multiple environments, and to have automatically all the required
software installed (which is something that with a .target file
definition cannot co-exist).

In the IDE this works! But in Jenkins the target platform resolution
with the .cquery does not contain required software!

For instance, emf.sdk seems to require (among the others) org.apache.ant
and org.eclipse.jdt.annotation (there are only few of them). In the IDE
when I run the materialization these additional plugins are
materialized... in Jenkins they are not :(

In the IDE, I created 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, in order
to avoid the fact that "An automatically created target platform is
based on the configuration of the currently running Eclipse instance."

So now I'm kind of lost... headless target resolution behaves differently?

In Jenkins I'm performing target platform resolution as follows

resolve 'bucky.example.rcpemf.target/target-platform.cquery'

is that correct?

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #972325 is a reply to message #972242] Mon, 05 November 2012 14:33 Go to previous messageGo to next message
Peter Nehrer is currently offline Peter NehrerFriend
Messages: 241
Registered: July 2009
Senior Member
FWIW -- I run into a similar issue when building off of Juno. I believe
the missing launcher fragments (for some odd architectures like ppc) can
be found in http://download.eclipse.org/eclipse/updates/4.2. These
problems go away when I add that to my rmap file after Juno.

On 11/5/12 8:15 AM, Lorenzo Bettini wrote:
> On 11/05/2012 01:48 PM, Thomas Hallgren wrote:
>> On 2012-11-05 12:53, Lorenzo Bettini wrote:
>>
>>> the problems are due to the equinox.launcher fragments (I think they are
>>> fragments)...
>>>
>>> these fragments are included in the target.site/feature.xml
>>>
>>> they are in the target platform, so why can't they be resolved?
>>> I probably remove these fragments from the feature.xml, but I was
>>> wondering why they cannot be resolved...
>>>
>> Not sure why this happens. Do you create the original TP from Juno or
>> from the Eclipse platfrom repository? I ask because IIRC some of the
>> launcher fragments are not present in Juno.
>
> Hi Thomas
>
> I'm using
>
> http://download.eclipse.org/releases/juno
>
> (see
> https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster/blob/master/bucky.example.rcpemf.target/target-platform.rmap)
> however, the strange thing is that in the target platform generated by
> the jenkins job the fragments are there, e.g.,
>
> ls
> .buckminster/tp/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813/META-INF/
>
> eclipse.inf ECLIPSE_.RSA ECLIPSE_.SF MANIFEST.MF
>
> but they cannot be resolved when performing site.p2 on the feature.xml...
>
> most of all, I'm experiencing another critical problem:
>
> I was using the cquery, rmap mechanism for defining the target platform
> because, from what I understand, it allows me to have a target for
> multiple environments, and to have automatically all the required
> software installed (which is something that with a .target file
> definition cannot co-exist).
>
> In the IDE this works! But in Jenkins the target platform resolution
> with the .cquery does not contain required software!
>
> For instance, emf.sdk seems to require (among the others) org.apache.ant
> and org.eclipse.jdt.annotation (there are only few of them). In the IDE
> when I run the materialization these additional plugins are
> materialized... in Jenkins they are not :(
>
> In the IDE, I created 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, in order
> to avoid the fact that "An automatically created target platform is
> based on the configuration of the currently running Eclipse instance."
>
> So now I'm kind of lost... headless target resolution behaves differently?
>
> In Jenkins I'm performing target platform resolution as follows
>
> resolve 'bucky.example.rcpemf.target/target-platform.cquery'
>
> is that correct?
>
> thanks in advance
> Lorenzo
>
Re: create a site.p2 from the target platform [message #972330 is a reply to message #972325] Mon, 05 November 2012 14:38 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Thanks Peter, could you please share the rmap?

However, my problem might not be related to this, since in the IDE it
works, and, as I said, that fragments seem to be in the generated target
platform...

cheers
Lorenzo

On 11/05/2012 03:33 PM, Peter Nehrer wrote:
> FWIW -- I run into a similar issue when building off of Juno. I believe
> the missing launcher fragments (for some odd architectures like ppc) can
> be found in http://download.eclipse.org/eclipse/updates/4.2. These
> problems go away when I add that to my rmap file after Juno.
>
> On 11/5/12 8:15 AM, Lorenzo Bettini wrote:
>> On 11/05/2012 01:48 PM, Thomas Hallgren wrote:
>>> On 2012-11-05 12:53, Lorenzo Bettini wrote:
>>>
>>>> the problems are due to the equinox.launcher fragments (I think they
>>>> are
>>>> fragments)...
>>>>
>>>> these fragments are included in the target.site/feature.xml
>>>>
>>>> they are in the target platform, so why can't they be resolved?
>>>> I probably remove these fragments from the feature.xml, but I was
>>>> wondering why they cannot be resolved...
>>>>
>>> Not sure why this happens. Do you create the original TP from Juno or
>>> from the Eclipse platfrom repository? I ask because IIRC some of the
>>> launcher fragments are not present in Juno.
>>
>> Hi Thomas
>>
>> I'm using
>>
>> http://download.eclipse.org/releases/juno
>>
>> (see
>> https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster/blob/master/bucky.example.rcpemf.target/target-platform.rmap)
>>
>> however, the strange thing is that in the target platform generated by
>> the jenkins job the fragments are there, e.g.,
>>
>> ls
>> .buckminster/tp/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813/META-INF/
>>
>>
>> eclipse.inf ECLIPSE_.RSA ECLIPSE_.SF MANIFEST.MF
>>
>> but they cannot be resolved when performing site.p2 on the feature.xml...
>>
>> most of all, I'm experiencing another critical problem:
>>
>> I was using the cquery, rmap mechanism for defining the target platform
>> because, from what I understand, it allows me to have a target for
>> multiple environments, and to have automatically all the required
>> software installed (which is something that with a .target file
>> definition cannot co-exist).
>>
>> In the IDE this works! But in Jenkins the target platform resolution
>> with the .cquery does not contain required software!
>>
>> For instance, emf.sdk seems to require (among the others) org.apache.ant
>> and org.eclipse.jdt.annotation (there are only few of them). In the IDE
>> when I run the materialization these additional plugins are
>> materialized... in Jenkins they are not :(
>>
>> In the IDE, I created 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, in order
>> to avoid the fact that "An automatically created target platform is
>> based on the configuration of the currently running Eclipse instance."
>>
>> So now I'm kind of lost... headless target resolution behaves
>> differently?
>>
>> In Jenkins I'm performing target platform resolution as follows
>>
>> resolve 'bucky.example.rcpemf.target/target-platform.cquery'
>>
>> is that correct?
>>
>> thanks in advance
>> Lorenzo
>>
>


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #972579 is a reply to message #972330] Mon, 05 November 2012 18:41 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
I am a newbie, so I might say something very wrong here, but do you have the famous delta pack in your materialized target?
Because it seems it cannot find org.eclipse.equinox.launcher.gtk.linux.ppc64:osgi.bundle (among others I guess),
that is part of the linux equinox launcher. Is your IDE a linux ide as well?

[Updated on: Mon, 05 November 2012 20:51]

Report message to a moderator

Re: create a site.p2 from the target platform [message #972737 is a reply to message #972579] Mon, 05 November 2012 21:33 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi Andrea

don't worry: I consider myself a bucky newbie as well :)

On 11/05/2012 07:41 PM, Andrea Richiardi wrote:
> I am a newbie, so I might say something vrey wrong, but, do you have the
> delta pack in your materialized target?

the delta pack is not needed anymore from what I understand, as long as
you have a target platform with launchers for all environments...

> Because it seems it cannot find
> org.eclipse.equinox.launcher.gtk.linux.ppc64:osgi.bundle (among others I
> guess),
> that is part of the linux launcher. Is your IDE a linux ide as well?

if you see my previous post: in the IDE it all works fine since the
target platform materialization materializes all the launchers...

in Jenkins: it is exactly as in the IDE: the target platform
materialization materializes all the launchers, but then, when resolving
the feature.xml, which includes all the fragments for launchers, it is
not able to find the fragment bundles, even though they are in the
target platform... that's why it is strange...

in Jenkins it cannot find ANY launcher fragment... even though they're
all in the materialized target platform...

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #973621 is a reply to message #972737] Tue, 06 November 2012 13:37 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2012-11-05 22:33, Lorenzo Bettini wrote:

> if you see my previous post: in the IDE it all works fine since the
> target platform materialization materializes all the launchers...
>
> in Jenkins: it is exactly as in the IDE: the target platform
> materialization materializes all the launchers, but then, when resolving
> the feature.xml, which includes all the fragments for launchers, it is
> not able to find the fragment bundles, even though they are in the
> target platform... that's why it is strange...
>
> in Jenkins it cannot find ANY launcher fragment... even though they're
> all in the materialized target platform...
>
Do you by any chance have some setting for target.os, target.ws, and
target.arch in your IDE preferences? Buckminster will look at
"Preferences" -> "Run/Debug" -> "String Substitution".

Are you running Buckminster twice? Once to materialize the target
platform and then again to build using that platform? Or is it all in
one go? I.e. are you running using a Buckminster script file or are you
invoking Buckminster several times from Jenkins?

- thomas
Re: create a site.p2 from the target platform [message #973711 is a reply to message #972330] Tue, 06 November 2012 15:06 Go to previous messageGo to next message
Peter Nehrer is currently offline Peter NehrerFriend
Messages: 241
Registered: July 2009
Senior Member
The relevant parts are:

<rm:locator searchPathRef="juno" failOnError="false"/>
<rm:locator searchPathRef="eclipse"/>
....
<rm:searchPath name="juno">
<rm:provider componentTypes="osgi.bundle,eclipse.feature"
readerType="p2">
<rm:uri format="http://download.eclipse.org/releases/juno"/>
</rm:provider>
</rm:searchPath>
<rm:searchPath name="eclipse">
<rm:provider componentTypes="osgi.bundle,eclipse.feature"
readerType="p2">
<rm:uri format="http://download.eclipse.org/eclipse/updates/4.2"/>
</rm:provider>
</rm:searchPath>

On 11/5/12 9:38 AM, Lorenzo Bettini wrote:
> Thanks Peter, could you please share the rmap?
>
> However, my problem might not be related to this, since in the IDE it
> works, and, as I said, that fragments seem to be in the generated target
> platform...
>
> cheers
> Lorenzo
>
> On 11/05/2012 03:33 PM, Peter Nehrer wrote:
>> FWIW -- I run into a similar issue when building off of Juno. I believe
>> the missing launcher fragments (for some odd architectures like ppc) can
>> be found in http://download.eclipse.org/eclipse/updates/4.2. These
>> problems go away when I add that to my rmap file after Juno.
>>
>> On 11/5/12 8:15 AM, Lorenzo Bettini wrote:
>>> On 11/05/2012 01:48 PM, Thomas Hallgren wrote:
>>>> On 2012-11-05 12:53, Lorenzo Bettini wrote:
>>>>
>>>>> the problems are due to the equinox.launcher fragments (I think they
>>>>> are
>>>>> fragments)...
>>>>>
>>>>> these fragments are included in the target.site/feature.xml
>>>>>
>>>>> they are in the target platform, so why can't they be resolved?
>>>>> I probably remove these fragments from the feature.xml, but I was
>>>>> wondering why they cannot be resolved...
>>>>>
>>>> Not sure why this happens. Do you create the original TP from Juno or
>>>> from the Eclipse platfrom repository? I ask because IIRC some of the
>>>> launcher fragments are not present in Juno.
>>>
>>> Hi Thomas
>>>
>>> I'm using
>>>
>>> http://download.eclipse.org/releases/juno
>>>
>>> (see
>>> https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster/blob/master/bucky.example.rcpemf.target/target-platform.rmap)
>>>
>>> however, the strange thing is that in the target platform generated by
>>> the jenkins job the fragments are there, e.g.,
>>>
>>> ls
>>> .buckminster/tp/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813/META-INF/
>>>
>>>
>>> eclipse.inf ECLIPSE_.RSA ECLIPSE_.SF MANIFEST.MF
>>>
>>> but they cannot be resolved when performing site.p2 on the feature.xml...
>>>
>>> most of all, I'm experiencing another critical problem:
>>>
>>> I was using the cquery, rmap mechanism for defining the target platform
>>> because, from what I understand, it allows me to have a target for
>>> multiple environments, and to have automatically all the required
>>> software installed (which is something that with a .target file
>>> definition cannot co-exist).
>>>
>>> In the IDE this works! But in Jenkins the target platform resolution
>>> with the .cquery does not contain required software!
>>>
>>> For instance, emf.sdk seems to require (among the others) org.apache.ant
>>> and org.eclipse.jdt.annotation (there are only few of them). In the IDE
>>> when I run the materialization these additional plugins are
>>> materialized... in Jenkins they are not :(
>>>
>>> In the IDE, I created 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, in order
>>> to avoid the fact that "An automatically created target platform is
>>> based on the configuration of the currently running Eclipse instance."
>>>
>>> So now I'm kind of lost... headless target resolution behaves
>>> differently?
>>>
>>> In Jenkins I'm performing target platform resolution as follows
>>>
>>> resolve 'bucky.example.rcpemf.target/target-platform.cquery'
>>>
>>> is that correct?
>>>
>>> thanks in advance
>>> Lorenzo
>>>
>>
>
>
Re: create a site.p2 from the target platform [message #973940 is a reply to message #973621] Tue, 06 November 2012 18:45 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

I think I found my main (stupid) mistake in headless (Jenkins)
build scenario:

I was materializing (through a cquery) the target platform (which is in
a separate project), and then I was performing site.p2 on the
target.site feature (which is another project). The target.site feature
was correctly bound to the workspace (through the rmap) but it had not
been actually resolved/materialized (in the IDE I didn't need this step
of course) :)

if I materialize also the target.site feature (with another cquery)
everything works :) (modulo materializing and performing into two
Jenkins build step, otherwise you get the problem described here
http://www.eclipse.org/forums/index.php/m/767528/ for a particular
conflicting bundle).

I've updated
https://github.com/LorenzoBettini/Target_to_p2_with_Buckminster where I
also have another feature (target.mirror.site) where besides all the
bundles I include also the features of the target platform, so that I
end up with a site.p2 with all the IU of the target platform.

Stay tuned for a blog post where I'll try to describe all of this.

Bucky rocks! :)

cheers
Lorenzo

On 11/06/2012 02:37 PM, Thomas Hallgren wrote:
> On 2012-11-05 22:33, Lorenzo Bettini wrote:
>
>> if you see my previous post: in the IDE it all works fine since the
>> target platform materialization materializes all the launchers...
>>
>> in Jenkins: it is exactly as in the IDE: the target platform
>> materialization materializes all the launchers, but then, when resolving
>> the feature.xml, which includes all the fragments for launchers, it is
>> not able to find the fragment bundles, even though they are in the
>> target platform... that's why it is strange...
>>
>> in Jenkins it cannot find ANY launcher fragment... even though they're
>> all in the materialized target platform...
>>
> Do you by any chance have some setting for target.os, target.ws, and
> target.arch in your IDE preferences? Buckminster will look at
> "Preferences" -> "Run/Debug" -> "String Substitution".
>
> Are you running Buckminster twice? Once to materialize the target
> platform and then again to build using that platform? Or is it all in
> one go? I.e. are you running using a Buckminster script file or are you
> invoking Buckminster several times from Jenkins?
>
> - thomas
>


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #973963 is a reply to message #973940] Tue, 06 November 2012 19:11 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Nicely done!

But, a newbie question:

If my feature (plugin) has dependencies, these dependencies are found but they have dependencies themselves.
Where are those taken from? The rmap? The TP? Do I have to materialize them in order to build the first plugin?

My guess would be I don't, but I keep having errors about CSpec missing even if the plugin is actually in the right place and I am getting confused Smile

Re: create a site.p2 from the target platform [message #975269 is a reply to message #973940] Wed, 07 November 2012 18:47 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
As promised, here's the blog post

http://www.lorenzobettini.it/2012/11/materializing-and-provisioning-your-target-platform-as-local-p2-site-with-buckminster/

I'd really like to have feedback, hoping I got things right :)

thanks in advance
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #975324 is a reply to message #973963] Wed, 07 November 2012 19:49 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/06/2012 08:11 PM, Andrea Richiardi wrote:
> Nicely done!
>
> But, a newbie question:
>
> If my feature (plugin) has dependencies, these dependencies are found
> but they have dependencies themselves.
> Where are those taken from? The rmap? The TP? Do I have to materialize
> them in order to build the first plugin?
>
> My guess would be I don't, but I keep having errors about CSpec missing
> even if the plugin is actually in the right place and I am getting
> confused :)

Are you using the IDE or headlessly?

From what I know, you must materialize the TP and then you have to
materialize the main plugin (usually this is the main feature for your
project) so that all its dependencies are also materialized, using the
materialize TP and possibly by using the rmap (if it needs further
dependencies).

see also this brand new post :)
http://www.lorenzobettini.it/2012/11/materializing-and-provisioning-your-target-platform-as-local-p2-site-with-buckminster/

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #976529 is a reply to message #975324] Thu, 08 November 2012 16:53 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Headless, and yes, after the "matching" phase, it tries to download the dependencies before materializing the plugin (just one in my case).
I am having a problem though with a p2 repository, see other post.
Good job with your article!
Re: create a site.p2 from the target platform [message #984679 is a reply to message #976529] Wed, 14 November 2012 22:24 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Another quick question, where is the headless buckminster materializing the tp?

Because in the log I see:
Processing changes in target platform locations...
INFO:  Resetting target platform Buckminster Default TP
Done processing changes in target platform locations
Project com.test.ui now has dynamic dependencies to com.test.ui
INFO:  Import complete.
Doing full workspace refresh
Waiting for jobs to end


But I can't, for example run:
buckminster perform com.test.ui#whatever


Receiving:
No component named com.test.ui is known to Buckminster


Why???
Re: create a site.p2 from the target platform [message #985285 is a reply to message #984679] Thu, 15 November 2012 09:23 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2012-11-14 23:24, Andrea Richiardi wrote:
> Another quick question, where is the headless buckminster materializing
> the tp?
>
Buckminster will materialize into the currently active TP. Unless you
specify what TP that will be, it will be a copy of the Runtime TP with
an additional folder that resides under the .buckminster project.

I'd recommend that you do the following to control the TP in you IDE.

1. Create a general project named TP.
2. Create a new PDE target platform (under pde preferences) named TP
where you add one location of type Directory. This directory should be
${workspace_loc:TP} (i.e. the project you just created).
3. Ensure that this new target platform is active.

Now run your resolve/materialize. Buckminster will populate the new TP.

From the command line you can use:

addtargetplatform -N TP -A <path to a directory>

to add an active target platform.

HTH,
- thomas

> Because in the log I see:
> Processing changes in target platform locations...
> INFO: Resetting target platform Buckminster Default TP
> Done processing changes in target platform locations
> Project com.test.ui now has dynamic dependencies to com.test.ui
> INFO: Import complete.
> Doing full workspace refresh
> Waiting for jobs to end
>
> But I can't, for example run:
> buckminster perform com.test.ui#whatever
>
> Receiving:
> No component named com.test.ui is known to Buckminster
>
> Why???
Re: create a site.p2 from the target platform [message #986227 is a reply to message #985285] Mon, 19 November 2012 14:20 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Thanks for answering,

the fact is that everything is working under the IDE. I have problems with the headless materialization. Basically I can't see any .buckminster folder, anywhere...

Probably, doing
addtargetplatform -N TP -A <path to a directory>
will generate the folder that the headless buckminster can fill...I am about to try.
Re: create a site.p2 from the target platform [message #986237 is a reply to message #986227] Mon, 19 November 2012 15:00 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Ok, it worked, it created a sub-folder that, on materializing, has been filled by all the dependencies...not the actual plugin though.
I'd better check the mspec again (I am materializing the cquery....is the mspec considered here?).
Re: create a site.p2 from the target platform [message #986241 is a reply to message #986237] Mon, 19 November 2012 15:15 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Ok, sorry for bombarding, but I found out that my source code is somehow materialized into C:\Users\*myuser*\workspace but the jar plugin is not actually generated. Can I change the workspace location or, better, disable the source materialization (I will just need to build it using a site.p2 action) ?
Re: create a site.p2 from the target platform [message #986246 is a reply to message #986241] Mon, 19 November 2012 15:53 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Ok, I am slowly moving forward. Now, even if the workspace is actually filled up with unwanted source code, I can still perform the action site.p2.

I now receive the error:

c:\buckminster>buckminster -L DEBUG perform com.test.custom#site.p2

The project was not built since its build path is incomplete. Cannot find the cl
ass file for org.eclipse.swt.events.HelpListener. Fix the build path then try bu
ilding this project


I can distinctly see that there is no org.eclipse.swt.win32.* in my TP.

Aren't all the needed plugin supposed to be there?

I think I am missing something then...
Re: create a site.p2 from the target platform [message #986264 is a reply to message #986246] Mon, 19 November 2012 16:40 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
To complete the process...forget about what I wrote before...I was just missing the correct path for my external and custom target platform.
A little, new, problem I get now is:
Access restriction: The type Display is not accessible due to restriction on req
uired library C:\p2_biomet\tc_platform\plugins\org.eclipse.swt.win32.win32.x86_6
4_3.5.0.v3550b.jar


Just using the headless buckminster, it works fine if I invoke the action withing the IDE.
Re: create a site.p2 from the target platform [message #986267 is a reply to message #986246] Mon, 19 November 2012 16:43 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Ok, now, even in the IDE I receive:

ERROR: org.eclipse.core.runtime.CoreException: C:\eclipse\configuration\org.eclipse.osgi\bundles\302\2\.cp\org\eclipse\buckminster\pde\antscripts\build.xml:214: C:\Users\arichiardi\Desktop\{fs:action.requirements} does not exist.
org.eclipse.core.runtime.CoreException: C:\eclipse\configuration\org.eclipse.osgi\bundles\302\2\.cp\org\eclipse\buckminster\pde\antscripts\build.xml:214: C:\Users\arichiardi\Desktop\{fs:action.requirements} does not exist.
	at org.eclipse.buckminster.ant.AntRunner.handleInvocationTargetException(AntRunner.java:167)
	at org.eclipse.buckminster.ant.AntRunner.run(AntRunner.java:322)
	at org.eclipse.buckminster.ant.actor.AntActor.internalPerform(AntActor.java:254)
	at org.eclipse.buckminster.core.actor.AbstractActor.perform(AbstractActor.java:195)
	at org.eclipse.buckminster.core.internal.actor.PerformManager$DirectActionInvocation.execute(PerformManager.java:143)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.internalPerform(PerformManager.java:454)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:293)
	at org.eclipse.buckminster.core.internal.actor.PerformManager.perform(PerformManager.java:305)
	at org.eclipse.buckminster.ui.InvokeActionJob.runInWorkspace(InvokeActionJob.java:67)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: C:\eclipse\configuration\org.eclipse.osgi\bundles\302\2\.cp\org\eclipse\buckminster\pde\antscripts\build.xml:214: C:\Users\arichiardi\Desktop\{fs:action.requirements} does not exist.
	at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
	at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:489)
	at org.eclipse.buckminster.ant.taskdefs.Copy.execute(Copy.java:42)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:392)
	at org.apache.tools.ant.Target.performTasks(Target.java:413)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:672)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:498)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.buckminster.ant.AntRunner.run(AntRunner.java:318)
	... 9 more


[Updated on: Mon, 19 November 2012 17:19]

Report message to a moderator

Re: create a site.p2 from the target platform [message #987456 is a reply to message #969943] Mon, 26 November 2012 16:58 Go to previous messageGo to next message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
Anyone has ever seen this error?

From what I found online, it is an Eclipse PDE building error...
Re: create a site.p2 from the target platform [message #987606 is a reply to message #987456] Tue, 27 November 2012 10:14 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 11/26/2012 05:58 PM, Andrea Richiardi wrote:
> Anyone has ever seen this error?
>
> From what I found online, it is an Eclipse PDE building error...

which error?

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: create a site.p2 from the target platform [message #987737 is a reply to message #969943] Tue, 27 November 2012 20:24 Go to previous message
Andrea Richiardi is currently offline Andrea RichiardiFriend
Messages: 64
Registered: August 2012
Member
The one two posts above, the first (shorter trace) is with the headless Buckminster, the second (longer trace) is if I try to build calling the create.product withing the Eclipse IDE.
Previous Topic:Dependency version mismatch when materializing a plugin
Next Topic:sourceLevel=DESIRE doesn't fetch component when already present in target platform
Goto Forum:
  


Current Time: Sat Mar 30 02:18:56 GMT 2024

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

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

Back to the top