Home » Archived » Buckminster » Migrating source builds from PDE, product issue
Migrating source builds from PDE, product issue [message #543844] |
Wed, 30 June 2010 18:02 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
Hi guys,
Here's my basic situation. I'm aiming to migrate from my PDE based athena build to one that's all bucky. But my motivating task is to get a product based build using Bucky. My PDE based update site build (finally) works, and I have working product builds as well -- however, those products don't include the source that I've defined ad that shows up in my update site. My current issue is how to get my source feature builds working under buckminster. I've found one bug on it but frankly having a hard time figuring out what steps I need to take to get it to work.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=244850
What is the best practice here? Is there anyway to simply use my current approach which has the sourcetemplateFeature, generate.feature@foo.bar.source=foo.bar, etc.. ? I'm kind of loath throw out something that is working now..
Second, I seem to have run into another edge case. In this case I get an error that doesn't make sense to me, and buckminster can't find the bundle.
Problem during meta-data refresh: CSpec org.eclipse.amp.doc, attribute bin.includes_0 already defines the path plugin.xml
No component named org.eclipse.amp.doc:osgi.bundle$0.8.0.qualifier is known to Buckminster
Here, I have multiple products defined that refer to features.
One thought that I had was to do some kind of end run around the whole issue of building the update site. Since I have a working Update site, would it make and sense to just use my .product and point Buckminster to an update site(s) that already exists?
cheers,
Miles
|
|
|
Re: Migrating source builds from PDE, product i ssue [message #543885 is a reply to message #543844] |
Wed, 30 June 2010 22:31 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
Your problem sounds like there may be issues with the
bundle/feature/product meta data. Any warning markers?
- henrik
Miles Parker <milesparker@gmail.com> wrote:
> Hi guys,
>
> Here's my basic situation. I'm aiming to migrate from my PDE based
> athena build to one that's all bucky. But my motivating task is to get
> a product based build using Bucky. My PDE based update site build
> (finally) works, and I have working product builds as well -- however,
> those products don't include the source that I've defined ad that
> shows up in my update site. My current issue is how to get my source
> feature builds working under buckminster. I've found one bug on it but
> frankly having a hard time figuring out what steps I need to take to
> get it to work.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=244850
>
> What is the best practice here? Is there anyway to simply use my
> current approach which has the sourcetemplateFeature,
> mailto:generate.feature@foo.bar.source=foo.bar, etc.. ? I'm kind of
> loath throw out something that is working now..
>
> Second, I seem to have run into another edge case. In this case I get
> an error that doesn't make sense to me, and buckminster can't find the
> bundle.
>
> Problem during meta-data refresh: CSpec org.eclipse.amp.doc, attribute
> bin.includes_0 already defines the path plugin.xml
> No component named org.eclipse.amp.doc:osgi.bundle$0.8.0.qualifier is
> known to Buckminster
>
> Here, I have multiple products defined that refer to features.
>
> One thought that I had was to do some kind of end run around the whole
> issue of building the update site. Since I have a working Update site,
> would it make and sense to just use my .product and point Buckminster
> to an update site(s) that already exists?
>
> cheers,
>
> Miles
--
- henrik
|
|
| |
Re: Migrating source builds from PDE, product i ssue [message #543890 is a reply to message #543887] |
Wed, 30 June 2010 23:37 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
I was asking because I have seen a couple of issues lately where the
cause was having empty, and in another one, incorrect meta data.
One recent issue was also about using "non standard names for source
features" - "Some of the source features in the the projects use
non-standard names (defined in the respective build.properties files).
Buckminster ignores these definitions and thus generates source features
with standard names. The problem is that the non-standard feature names
are referenced from other features and they are naturally not found."
Also check this: "The MANIFEST.MF file in the bundle is missing the
standard "Manifest-Version" header, which confuses Buckminster to a
point that it is not able to build the bundle correctly. " and, I have
also seen that without correct manifest declaration there are fewer/no
warnings errors for meta data problems - but some tools (like PDE)
builds it anyway.
- henrik
On 7/1/10 1:16 AM, Miles Parker wrote:
> Henrik Lindberg wrote on Wed, 30 June 2010 18:31
>> Your problem sounds like there may be issues with the
>> bundle/feature/product meta data. Any warning markers?
>
>
> Nope, not with that. I mean I have the usual externalization warnings
> and what not but I've pretty carefully dealt with any packaging issues.
> As I say, a full headless PDE (hudson) based releng build works, so if
> there were issues they would most likely (hah!) have come up.
>
> One gigantic caveat.. and you might already be aware of this -- but if
> you define a source feature as recommended for PDE builds, there are
> always errors in the feature.xml. This is because you need to have
> includes for the source features but they don't actually exist in the
> workspace environment -- they're only generated at runtime. I never have
> liked that approach but as I say AFAICT that's the only way to do it
> "correctly".
|
|
|
Re: Migrating source builds from PDE, product issue [message #543941 is a reply to message #543844] |
Thu, 01 July 2010 07:14 |
|
Hi Miles,
The source/bundle source generation is turned on by default so the
features and bundles should be generated without much additional work.
There are some things to remember.
Ensure that the src.includes in the build.properties of your bundles and
features contains something. Have it appoint files like the about.html
or license.html. Do not include the feature.properties or
plugin.properties since they will be generated (and contain slightly
different settings).
The source features should be published to the site automatically but
there are two things that you might want to consider:
1. Adding the source features to a category. If you don't, they will not
show up in the install wizards unless you uncheck the "Group items by
category". You can use our site definition feature [1] (the one we
perform site.p2 action on) as an example on how to do this. The magic is
in the category.xml:
2. You might want to create an SDK feature, i.e. a feature that installs
both the bundles and their generated sources. You do that by listing the
source features as 'included features' of the SDK feature. This will
generate some warnings from the PDE compiler since it doesn't know that
the features exists but those warnings can be ignored. You can even
create an SDK feature that includes the generated source of itself.
Kind Regards,
Thomas Hallgren
[1]
http://dev.eclipse.org/svnroot/tools/org.eclipse.buckminster /trunk/org.eclipse.buckminster.site.eclipse/
On 06/30/2010 08:02 PM, Miles Parker wrote:
> Hi guys,
>
> Here's my basic situation. I'm aiming to migrate from my PDE based
> athena build to one that's all bucky. But my motivating task is to get a
> product based build using Bucky. My PDE based update site build
> (finally) works, and I have working product builds as well -- however,
> those products don't include the source that I've defined ad that shows
> up in my update site. My current issue is how to get my source feature
> builds working under buckminster. I've found one bug on it but frankly
> having a hard time figuring out what steps I need to take to get it to
> work.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=244850
>
> What is the best practice here? Is there anyway to simply use my current
> approach which has the sourcetemplateFeature,
> mailto:generate.feature@foo.bar.source=foo.bar, etc.. ? I'm kind of
> loath throw out something that is working now..
>
> Second, I seem to have run into another edge case. In this case I get an
> error that doesn't make sense to me, and buckminster can't find the bundle.
>
> Problem during meta-data refresh: CSpec org.eclipse.amp.doc, attribute
> bin.includes_0 already defines the path plugin.xml
> No component named org.eclipse.amp.doc:osgi.bundle$0.8.0.qualifier is
> known to Buckminster
>
> Here, I have multiple products defined that refer to features.
>
> One thought that I had was to do some kind of end run around the whole
> issue of building the update site. Since I have a working Update site,
> would it make and sense to just use my .product and point Buckminster to
> an update site(s) that already exists?
>
> cheers,
>
> Miles
|
|
| |
Re: Migrating source builds from PDE, product i ssue [message #544163 is a reply to message #543890] |
Thu, 01 July 2010 20:51 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
Henrik Lindberg wrote on Wed, 30 June 2010 19:37 | I was asking because I have seen a couple of issues lately where the
cause was having empty, and in another one, incorrect meta data.
|
Right, always worth double checking. I went back through again and looked for any oddities. A few things to clean up a bit but everything seems correct.
Quote: | One recent issue was also about using "non standard names for source
features" - "Some of the source features in the the projects use
non-standard names (defined in the respective build.properties files).
|
All of my source features are generated so that should n't be an issue...?
[Updated on: Thu, 01 July 2010 20:53] Report message to a moderator
|
|
| | | | |
Re: Migrating source builds from PDE, product issue [message #544179 is a reply to message #543844] |
Thu, 01 July 2010 22:14 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
OK, the o.e.amp.doc error has gone away..not sure exactly why but I won't worry about it..now I just get a lot of
"E No component named org.eclipse.datatools.enablement.ibm.feature:eclipse.feature /[1.0.0,raw:MpM)(!(eclipse.p2.optional=false)) is known to Buckminster.."
But I take it I don't need to worry about those.
On the actual P2 site build issue, I noticed one other data point..the bundle in question is showing up in the log twice..
[start org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier #eclipse.build]
[end org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier #eclipse.build]
[start org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier #bundle.jar]
[end org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier #bundle.jar]
All other bundles are showing up just once. What's the significance of this "bundle.jar" and why might it be happening?
[Updated on: Thu, 01 July 2010 22:15] Report message to a moderator
|
|
| | | | | |
Re: Migrating source builds from PDE, product i ssue [message #544204 is a reply to message #544200] |
Fri, 02 July 2010 01:39 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
Good news!
I would also like the IDE to be able to flag this.
This was a quite recent discovery, maybe we can add a better error
message in Buckminster to keep you from guessing what could be wrong.
- henrik
On 7/2/10 2:27 AM, Miles Parker wrote:
> Henrik Lindberg wrote on Wed, 30 June 2010 19:37
>> Also check this: "The MANIFEST.MF file in the bundle is missing the
>> standard "Manifest-Version" header, which confuses Buckminster to a
>> point that it is not able to build the bundle correctly. " and, I have
>> also seen that without correct manifest declaration there are fewer/no
>> warnings errors for meta data problems - but some tools (like PDE)
>> builds it anyway.
>
>
> I'll be damned. I have over 100 separate MANIFEST.MFs so I didn't
> manually inspect them all. (You shouldn't have to, that's what the IDE
> is for, right? ;)) I just looked for trouble spots but somehow I missed
> this one. When I did an exhaustive compare with a working plugin, guess
> what was missing from the offending plugin?
|
|
|
Re: Migrating source builds from PDE, product i ssue [message #544205 is a reply to message #544201] |
Fri, 02 July 2010 01:49 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
Perhaps something like...
Do two searches a) something that finds all manifests, b) search for
"Manifest-Version"
View as list, select all, copy, paste into a file
compare the two files
Unfortunately, there is no regexp pattern for "start of file" in Eclipse
file search.
- henrik
On 7/2/10 2:28 AM, Miles Parker wrote:
> By the way, totally off-topic, but has anyone figured out how to do a
> search for files that *don't* contain a given string such as
> Manifest-Version? I don't think you can do it with regexp. I could do it
> with grep, but that doesn't help for Eclipse editing.
|
|
|
Re: Migrating source builds from PDE, product i ssue [message #544206 is a reply to message #544205] |
Fri, 02 July 2010 01:59 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
Yes that makes sense. I just remembered another technique I've used which is to just do the search for matching ones and then do show in package explorer for all of them. Then you can pick out by inspection the projects that don't have a file with the correct bits.
Henrik Lindberg wrote on Thu, 01 July 2010 21:49 | Perhaps something like...
Do two searches a) something that finds all manifests, b) search for
"Manifest-Version"
View as list, select all, copy, paste into a file
compare the two files
Unfortunately, there is no regexp pattern for "start of file" in Eclipse
file search.
- henrik
On 7/2/10 2:28 AM, Miles Parker wrote:
> By the way, totally off-topic, but has anyone figured out how to do a
> search for files that *don't* contain a given string such as
> Manifest-Version? I don't think you can do it with regexp. I could do it
> with grep, but that doesn't help for Eclipse editing.
|
|
|
| |
Re: Migrating source builds from PDE, product issue [message #544210 is a reply to message #543941] |
Fri, 02 July 2010 02:46 |
Miles Parker Messages: 1341 Registered: July 2009 |
Senior Member |
|
|
Thomas, one more question, please see below..
Thomas Hallgren wrote on Thu, 01 July 2010 03:14 |
2. You might want to create an SDK feature, i.e. a feature that installs
both the bundles and their generated sources. You do that by listing the
source features as 'included features' of the SDK feature. This will
generate some warnings from the PDE compiler since it doesn't know that
the features exists but those warnings can be ignored. You can even
create an SDK feature that includes the generated source of itself.
|
As I mentioned I have this already -- its actually not an SDK feature, its an enveloping source feature that includes the source features themselves as well as docs.
But its strange -- the problem that I'm having is that it looks like Buckminster is creating a dependency to the (as far as I can tell imaginary) org.eclipse.amp.source.source.feature instead, or at least putting that in the metadata. I have org.eclipse.amp.source.feature defined as a dependency and it appears in the build dir, but if I select the Source to install in P2, it shows that source id as org.eclipse.amp.source.source.feature.
|
|
| |
Re: Migrating source builds from PDE, product issue [message #544248 is a reply to message #544179] |
Fri, 02 July 2010 06:38 |
|
On 07/02/2010 12:14 AM, Miles Parker wrote:
> On the actual P2 site build issue, I noticed one other data point..the
> bundle in question is showing up in the log twice..
>
> [start org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier
> #eclipse.build]
> [end org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier
> #eclipse.build]
> [start org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier
> #bundle.jar]
> [end org.eclipse.amp.amf.acore.editor:osgi.bundle$0.8.0.qualifier
> #bundle.jar]
>
This is the start/end of two different actions on the same bundle as it is the expected behavior. It should be the same
for all bundles.
First it performs the Eclipse workspace build (i.e. the build that is defined in your .project files). This produces the
..class files, copies .properties etc. Everything that normally happens when the incremental build kicks in in your IDE.
This is the #eclipse.build. After that, it performs the #bundle.jar. That is the action that creates the actual jar to
be published.
- thomas
|
|
|
Re: Migrating source builds from PDE, product issue [message #544249 is a reply to message #544210] |
Fri, 02 July 2010 06:38 |
|
On 07/02/2010 04:46 AM, Miles Parker wrote:
> Thomas, one more question, please see below..
> As I mentioned I have this already -- its actually not an SDK feature,
> its an enveloping source feature that includes the source features
> themselves as well as docs.
> But its strange -- the problem that I'm having is that it looks like
> Buckminster is creating a dependency to the (as far as I can tell
> imaginary) org.eclipse.amp.source.source.feature instead, or at least
> putting that in the metadata. I have org.eclipse.amp.source.feature
> defined as a dependency and it appears in the build dir, but if I select
> the Source to install in P2, it shows that source id as
> org.eclipse.amp.source.source.feature.
That doesn't sound right. Can you please enter a bugzilla for that?
Regards,
Thomas Hallgren
|
|
|
Re: Migrating source builds from PDE, product issue [message #544250 is a reply to message #544176] |
Fri, 02 July 2010 06:41 |
|
On 07/02/2010 12:02 AM, Miles Parker wrote:
> OK this is weird.. I looked at the actual bundle (I have to admit that
> I'm still having a hard time mapping "OSGi bundle" to "plugin" when
> reading these messages) and it contains jar and src.jars like:
>
> ${bundle.id}_${bundle.version}.jar
>
> ?!
>
Exactly where do you find these files? Adjacent to the actual source in your workspace or in the build output?
- thomas
|
|
| | |
Goto Forum:
Current Time: Thu Sep 26 21:05:56 GMT 2024
Powered by FUDForum. Page generated in 0.07274 seconds
|