Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335248 - Investigate support for generating .api_description files for bundles that are not API tools enabled
Summary: Investigate support for generating .api_description files for bundles that ar...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 330947
Blocks:
  Show dependency tree
 
Reported: 2011-01-24 16:13 EST by Curtis Windatt CLA
Modified: 2011-03-15 16:15 EDT (History)
7 users (show)

See Also:
curtis.windatt.public: review? (aniefer)


Attachments
Possible Fix (2.09 KB, patch)
2011-03-02 17:36 EST, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis Windatt CLA 2011-01-24 16:13:37 EST
+++ This bug was initially created as a clone of Bug #330947 +++

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.

+++

Users can set alloNonApiProject=true to run the task on 

Since users often access this task using PDE Build support, we should allow this setting to be accessed through PDE Build.

We will probably need to modify ModelBuildScriptGenerator#generateAPIToolsTarget and #generateAPIToolsCall and set a default value for the property in ModelBuildScriptGenerator#generatePrologue.  We might be able to get away without a default as not setting the property is equivalent to setting it to false.
Comment 1 Curtis Windatt CLA 2011-03-02 17:36:00 EST
Created attachment 190214 [details]
Possible Fix
Comment 2 Curtis Windatt CLA 2011-03-02 17:37:29 EST
Andrew, can you look at this patch and see if I'm doing anything blatantly wrong?

Peter, can you test this and see if it will work for you?

The code change is very minimal because it is an optional boolean property.  If the allowNonApiProject parameter is passed to PDE build, it will be set as the attribute on the generation task.  The value must be 'true' for anything to change.  If the parameter is not added to the parameters given to PDE build, the attribute should never be set on the task.
Comment 3 Curtis Windatt CLA 2011-03-03 12:19:59 EST
Andrew, please review my fix for M6 if at all possible.  Sorry it's so late in the milestone!
Comment 4 Peter Parapounsky CLA 2011-03-03 12:34:58 EST
(In reply to comment #2)
> Andrew, can you look at this patch and see if I'm doing anything blatantly
> wrong?
> 
> Peter, can you test this and see if it will work for you?
> 
> The code change is very minimal because it is an optional boolean property.  If
> the allowNonApiProject parameter is passed to PDE build, it will be set as the
> attribute on the generation task.  The value must be 'true' for anything to
> change.  If the parameter is not added to the parameters given to PDE build,
> the attribute should never be set on the task.

Thanks Curtis, this sounds like exactly what we need. I'll test it out once it is available in a build.
Comment 5 Andrew Niefer CLA 2011-03-04 14:09:50 EST
The attached patch has been released.
Comment 6 Peter Parapounsky CLA 2011-03-15 16:15:20 EDT
I tested the fix in IES build I20110314-1108 and it worked fine. Thank you.