views:

312

answers:

1

I'm trying to get my PDE build script to invoke my customBuildCallbacks.xml. I've added

# build.properties
customBuildCallbacks=customBuildCallbacks.xml

and copied the customBuildCallbacks.xml file from the PDE build plugin, but it's still not called. The only reference to customBuildCallbacks I get (with -verbose) is a note

[java] Override ignored for property "customBuildCallbacks"

What I'm trying to do is to run FindBugs on the compiled Jars.

+1  A: 

Where did you copy it? In Feature and Plug-in custom build steps, it says:

To use custom targets, a feature or plug-in must define the property customBuildCallbacks in its build.properties file; the value of this property is the location of an xml file, relative to the root of the feature/plug-in, containing the custom targets.
If the xml file is located elsewhere, use the property customBuildCallbacks.buildpath to set the directory to use.

May be the "Override ignored" message is for:

"you have overridden customBuildCallbacks, but I (the PDE) cannot find it"?


Note: Andrew Niefer mentions in the comments bug 165768, a design error about customBuildCallbacks since eclipse 3.2.1 (and still open to this day).

2 plugins, both use the same customBuildCallbacks.xml, with in both plugins build.properties:

 customBuildCallbacks=../mydefaultcallbacks/customBuildCallbacks.xml

Then you have a 3th plugin, that shall use different callbacks, so in this plugins build.properties you write:

 customBuildCallbacks=./customBuildCallbacks.xml

And then you have a feature, that shall use callbacks as well, but whatever you write in this features build.properties, you will end up with this message:

[available] DEPRECATED - <available> used to override an existing property.
[available]   Build file should not reuse the same property name for different values.

Andrew himself commented in 2006:

It appears that the plugin's build.xml is inheriting the customBuildCallbacks property from the feature.

VonC
Thanks. I was having the customBuildCallbacks.xml in the same directory as the PDE build.properties, which wasn't even one of the plugins to build. Moving it to a plugin works much better.
JesperE
The "override ignored" may be related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=165768. In that bug we still see the custom targets getting called despite the warning.
Andrew Niefer
@Andrew: thank you for this update. I have completed my answer.
VonC
I'll probably opt for skipping customBuildCallbacks entirely, and run FindBugs on the packaged product instead.
JesperE