Community
Participate
Working Groups
Current the ApiFileGenerationTask will short-circuit if the bundle it is run on does not have the API tools nature. We should investigate some level of support for generating an .api_description file for bundles without the API tools nature. The benefit of this is that a build process could make use of the other API tasks without having to explicitly modify all of the bundles to be API tools enabled.
Looks like we already have a bit of a workaround for this in 3.7 M4. Add the following property to the file generation target setallownonapiproject="true" The check for the api tooling nature will be skipped and the generation will continue normally. This change was accidentally added as part of a fix for bug 330825, but it is exactly what is being asked for. The only other change I think we need to make here is to print something out when a project is skipped because of the missing nature.
Peter P. can you test out this property and see if that will satisfy your use case? We will need to update the task documentation to explain this property.
Sorry, the property is allowNonApiProject="true"
Created attachment 186232 [details] Doc Fix
I think we would prefer the property "allowNonApiProject" to work as a PDE build property, just like "generateAPIDescription". We use PDE build to build plugins and it seems it will be more efficient(for us at least) the "allowNonApiProject" property to be available at this level, so we won't have to run the ApiFilegenerationTask separately after PDE build is done. Would that be possible?
Andrew, can you comment on how reasonable/difficult it would be to add support for a new property? Is there an easier way to make the option available on the file generation task? I thought that, even in a pde build script, the task would be in an ant file where the allowNonApiProject property could be set. The option should always be the same for the entire pde build script.
I have applied the patch to HEAD. The functionality is available on the api tooling ant task. I opened bug Bug 335248 to add support to PDE build for the option. We should be able to add it in M6. Fixed in HEAD.
Verified on I20110124-1800