Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Reading Bundle-SymbolicName and Bundle-Version from custom build.xml?
Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #52646] Mon, 30 March 2009 22:47 Go to next message
Tom Morris is currently offline Tom MorrisFriend
Messages: 89
Registered: July 2009
Member
Apparently the only way I can get PDE's Export to stop silently deleting
my build.xml file (nasty, nasty PDE!) is to put custom = true in my
build.properties file and merge the necessary PDE build targets into my
own Ant build.

Back in 2006, there didn't appear to be an easy way to access the
necessary parameters (Bundle-SymbolicName and Bundle-Version) according
to this report
http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg10949.html

Has the situation improved today? Is there a way to get this
information from the manifest or some other source which is accessible
to Ant?

Tom
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #52728 is a reply to message #52646] Tue, 31 March 2009 00:33 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Tom Morris wrote:
> Apparently the only way I can get PDE's Export to stop silently deleting
> my build.xml file (nasty, nasty PDE!) is to put custom = true in my
> build.properties file and merge the necessary PDE build targets into my
> own Ant build.
>
> Back in 2006, there didn't appear to be an easy way to access the
> necessary parameters (Bundle-SymbolicName and Bundle-Version) according
> to this report
> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg10949.html
>
> Has the situation improved today? Is there a way to get this
> information from the manifest or some other source which is accessible
> to Ant?

We at least prompt in 3.5 now if we're going to override your build.xml...

Is there a reason you have to have a build.xml in your project? can't it
be my-build.xml?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #52755 is a reply to message #52728] Tue, 31 March 2009 03:24 Go to previous messageGo to next message
Tom Morris is currently offline Tom MorrisFriend
Messages: 89
Registered: July 2009
Member
Chris Aniszczyk wrote:
> Tom Morris wrote:
>> Back in 2006, there didn't appear to be an easy way to access the
>> necessary parameters (Bundle-SymbolicName and Bundle-Version)
>> according to this report
>> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg10949.html
>>
>> Has the situation improved today? Is there a way to get this
>> information from the manifest or some other source which is accessible
>> to Ant?
>
> Is there a reason you have to have a build.xml in your project? can't it
> be my-build.xml?

Thanks for the quick reply Chris. I take it that that's a "No" in
answer to the original question(s).

In answer to your questions, the main reasons that it's called build.xml
are: a) that's what Ant uses and b) that's what the development team
chose in Fall 2000 when they switched to using Ant for their builds.

As far as renaming things goes, let me turn the question around. Is
there any particular reason that a temporary file which is going to
exist for all of 5 minutes has be given a name that conflicts with every
Ant-based build in the known universe? If a name like
your-special-eclipse-pde-temporary-build.xml was used, there'd be fewer
conflicts. Better yet, check to make sure the chosen name isn't already
in use.

I'm trying to promote Eclipse plugins to a project which has been around
for a decade, so I really don't want to be insisting that they have to
change things just to get started. I'd like to emphasize the benefits,
not the costs.

If I figure out a good way to parse the manifest or some other solution,
I'll post an update.

Tom
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #52781 is a reply to message #52755] Tue, 31 March 2009 13:42 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
It was before my time, but it was probably named 'build.xml' for the
same reason you named yours build.xml, (it is an ant script that builds
the project).

Note that the warning is only in the UI for export, headless build can't
prompt for warnings since that defeat the whole purpose of an automated
headless build.

For the version, PDE/Build will modify the custom build.xml and replace
the value on a property named "version.suffix", the value will be the
full version of the bundle with the qualifier replaced.

There is no property for the symbolic-name. Don't you know this? It
isn't something that changes.

-Andrew


Tom Morris wrote:
> Chris Aniszczyk wrote:
>> Tom Morris wrote:
>>> Back in 2006, there didn't appear to be an easy way to access the
>>> necessary parameters (Bundle-SymbolicName and Bundle-Version)
>>> according to this report
>>> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg10949.html
>>>
>>> Has the situation improved today? Is there a way to get this
>>> information from the manifest or some other source which is
>>> accessible to Ant?
>>
>> Is there a reason you have to have a build.xml in your project? can't
>> it be my-build.xml?
>
> Thanks for the quick reply Chris. I take it that that's a "No" in
> answer to the original question(s).
>
> In answer to your questions, the main reasons that it's called build.xml
> are: a) that's what Ant uses and b) that's what the development team
> chose in Fall 2000 when they switched to using Ant for their builds.
>
If a name like
> your-special-eclipse-pde-temporary-build.xml was used, there'd be fewer
> conflicts. Better yet, check to make sure the chosen name isn't already
> in use.
>
> I'm trying to promote Eclipse plugins to a project which has been around
> for a decade, so I really don't want to be insisting that they have to
> change things just to get started. I'd like to emphasize the benefits,
> not the costs.
>
> If I figure out a good way to parse the manifest or some other solution,
> I'll post an update.
>
> Tom
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #52807 is a reply to message #52781] Tue, 31 March 2009 14:06 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Andrew Niefer wrote:
> It was before my time, but it was probably named 'build.xml' for the
> same reason you named yours build.xml, (it is an ant script that builds
> the project).
>
> Note that the warning is only in the UI for export, headless build can't
> prompt for warnings since that defeat the whole purpose of an automated
> headless build.
>
> For the version, PDE/Build will modify the custom build.xml and replace
> the value on a property named "version.suffix", the value will be the
> full version of the bundle with the qualifier replaced.
>
> There is no property for the symbolic-name. Don't you know this? It
> isn't something that changes.

Andrew, is there a way we can change the build.xml that gets generated
to be pde-build.xml or something?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #53043 is a reply to message #52807] Wed, 01 April 2009 15:22 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
See my comment here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=120840#c8

Changing the default name of the script should be considered a major
breaking API change. The alternative is then to allow a bundle to
provide an alternate name. With some restrictions on features, this
should be possible, however it is not a small change and affects all the
generated scripts.

There is no time for something like this in 3.5. This would need to be
accounted for in the initial planning at the beginning of a release cycle.

-Andrew

Chris Aniszczyk wrote:
> Andrew Niefer wrote:
>> It was before my time, but it was probably named 'build.xml' for the
>> same reason you named yours build.xml, (it is an ant script that
>> builds the project).
>>
>> Note that the warning is only in the UI for export, headless build
>> can't prompt for warnings since that defeat the whole purpose of an
>> automated headless build.
>>
>> For the version, PDE/Build will modify the custom build.xml and
>> replace the value on a property named "version.suffix", the value will
>> be the full version of the bundle with the qualifier replaced.
>>
>> There is no property for the symbolic-name. Don't you know this? It
>> isn't something that changes.
>
> Andrew, is there a way we can change the build.xml that gets generated
> to be pde-build.xml or something?
>
> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #594267 is a reply to message #52646] Tue, 31 March 2009 00:33 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Tom Morris wrote:
> Apparently the only way I can get PDE's Export to stop silently deleting
> my build.xml file (nasty, nasty PDE!) is to put custom = true in my
> build.properties file and merge the necessary PDE build targets into my
> own Ant build.
>
> Back in 2006, there didn't appear to be an easy way to access the
> necessary parameters (Bundle-SymbolicName and Bundle-Version) according
> to this report
> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg10949.html
>
> Has the situation improved today? Is there a way to get this
> information from the manifest or some other source which is accessible
> to Ant?

We at least prompt in 3.5 now if we're going to override your build.xml...

Is there a reason you have to have a build.xml in your project? can't it
be my-build.xml?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #594277 is a reply to message #52728] Tue, 31 March 2009 03:24 Go to previous message
Tom Morris is currently offline Tom MorrisFriend
Messages: 89
Registered: July 2009
Member
Chris Aniszczyk wrote:
> Tom Morris wrote:
>> Back in 2006, there didn't appear to be an easy way to access the
>> necessary parameters (Bundle-SymbolicName and Bundle-Version)
>> according to this report
>> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg10949.html
>>
>> Has the situation improved today? Is there a way to get this
>> information from the manifest or some other source which is accessible
>> to Ant?
>
> Is there a reason you have to have a build.xml in your project? can't it
> be my-build.xml?

Thanks for the quick reply Chris. I take it that that's a "No" in
answer to the original question(s).

In answer to your questions, the main reasons that it's called build.xml
are: a) that's what Ant uses and b) that's what the development team
chose in Fall 2000 when they switched to using Ant for their builds.

As far as renaming things goes, let me turn the question around. Is
there any particular reason that a temporary file which is going to
exist for all of 5 minutes has be given a name that conflicts with every
Ant-based build in the known universe? If a name like
your-special-eclipse-pde-temporary-build.xml was used, there'd be fewer
conflicts. Better yet, check to make sure the chosen name isn't already
in use.

I'm trying to promote Eclipse plugins to a project which has been around
for a decade, so I really don't want to be insisting that they have to
change things just to get started. I'd like to emphasize the benefits,
not the costs.

If I figure out a good way to parse the manifest or some other solution,
I'll post an update.

Tom
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #594286 is a reply to message #52755] Tue, 31 March 2009 13:42 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
It was before my time, but it was probably named 'build.xml' for the
same reason you named yours build.xml, (it is an ant script that builds
the project).

Note that the warning is only in the UI for export, headless build can't
prompt for warnings since that defeat the whole purpose of an automated
headless build.

For the version, PDE/Build will modify the custom build.xml and replace
the value on a property named "version.suffix", the value will be the
full version of the bundle with the qualifier replaced.

There is no property for the symbolic-name. Don't you know this? It
isn't something that changes.

-Andrew


Tom Morris wrote:
> Chris Aniszczyk wrote:
>> Tom Morris wrote:
>>> Back in 2006, there didn't appear to be an easy way to access the
>>> necessary parameters (Bundle-SymbolicName and Bundle-Version)
>>> according to this report
>>> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg10949.html
>>>
>>> Has the situation improved today? Is there a way to get this
>>> information from the manifest or some other source which is
>>> accessible to Ant?
>>
>> Is there a reason you have to have a build.xml in your project? can't
>> it be my-build.xml?
>
> Thanks for the quick reply Chris. I take it that that's a "No" in
> answer to the original question(s).
>
> In answer to your questions, the main reasons that it's called build.xml
> are: a) that's what Ant uses and b) that's what the development team
> chose in Fall 2000 when they switched to using Ant for their builds.
>
If a name like
> your-special-eclipse-pde-temporary-build.xml was used, there'd be fewer
> conflicts. Better yet, check to make sure the chosen name isn't already
> in use.
>
> I'm trying to promote Eclipse plugins to a project which has been around
> for a decade, so I really don't want to be insisting that they have to
> change things just to get started. I'd like to emphasize the benefits,
> not the costs.
>
> If I figure out a good way to parse the manifest or some other solution,
> I'll post an update.
>
> Tom
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #594296 is a reply to message #52781] Tue, 31 March 2009 14:06 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
Andrew Niefer wrote:
> It was before my time, but it was probably named 'build.xml' for the
> same reason you named yours build.xml, (it is an ant script that builds
> the project).
>
> Note that the warning is only in the UI for export, headless build can't
> prompt for warnings since that defeat the whole purpose of an automated
> headless build.
>
> For the version, PDE/Build will modify the custom build.xml and replace
> the value on a property named "version.suffix", the value will be the
> full version of the bundle with the qualifier replaced.
>
> There is no property for the symbolic-name. Don't you know this? It
> isn't something that changes.

Andrew, is there a way we can change the build.xml that gets generated
to be pde-build.xml or something?

Cheers,

Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Re: Reading Bundle-SymbolicName and Bundle-Version from custom build.xml? [message #594413 is a reply to message #52807] Wed, 01 April 2009 15:22 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
See my comment here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=120840#c8

Changing the default name of the script should be considered a major
breaking API change. The alternative is then to allow a bundle to
provide an alternate name. With some restrictions on features, this
should be possible, however it is not a small change and affects all the
generated scripts.

There is no time for something like this in 3.5. This would need to be
accounted for in the initial planning at the beginning of a release cycle.

-Andrew

Chris Aniszczyk wrote:
> Andrew Niefer wrote:
>> It was before my time, but it was probably named 'build.xml' for the
>> same reason you named yours build.xml, (it is an ant script that
>> builds the project).
>>
>> Note that the warning is only in the UI for export, headless build
>> can't prompt for warnings since that defeat the whole purpose of an
>> automated headless build.
>>
>> For the version, PDE/Build will modify the custom build.xml and
>> replace the value on a property named "version.suffix", the value will
>> be the full version of the bundle with the qualifier replaced.
>>
>> There is no property for the symbolic-name. Don't you know this? It
>> isn't something that changes.
>
> Andrew, is there a way we can change the build.xml that gets generated
> to be pde-build.xml or something?
>
> Cheers,
>
> Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465
> http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
Previous Topic:Building "umbrella" features that include multiple pre-built child features
Next Topic:Get the path of the current document
Goto Forum:
  


Current Time: Sat Apr 20 01:30:36 GMT 2024

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

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

Back to the top