Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 147393 - Support annotation processors in module build harness
Support annotation processors in module build harness
Status: RESOLVED FIXED
Product: apisupport
Classification: Unclassified
Component: Harness
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Jesse Glick
issues@apisupport
:
Depends on: 150793 152353 152620 152896
Blocks: 149136 150447 150804 153093
  Show dependency treegraph
 
Reported: 2008-09-16 16:05 UTC by Jesse Glick
Modified: 2009-02-19 20:17 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Patch to enable APs when compiling NBM projects (14.75 KB, patch)
2008-09-16 16:06 UTC, Jesse Glick
Details | Diff
Demo application (suite project) using patch (52.24 KB, application/x-compressed)
2008-09-16 16:06 UTC, Jesse Glick
Details
Refined patch to add 269 support (21.42 KB, patch)
2008-10-16 21:58 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-09-16 16:05:36 UTC
Try the attached demo app with the attached patch. You need to set the app's platform to whatever you build with this
patch (suffices to run: ant bootstrap && ant -f apisupport.harness/build.xml).

Note that the plugin* modules using the indexed annotations need to have sezpoz (which contains the annotation
processor) as a dep, to make sure the AP is included in the compilation classpath. Otherwise the annotations are
silently ignored. Probably to make the system easier to use we would need to fix this somehow; possibilities:

1. Allow a module (such as 'api' in the demo) to reexport another module ('sezpoz') to anything depending on it, a la
OSGi reexports.

2. Allow a module ('sezpoz') to place an annotation processor in a separate JAR file with a known name pattern, which
would be included in the javac factorypath when compiling any module which _transitively_ depends on this module. Would
also let us remove the hack for APs currently in ParseProjectXml, since the public package list would be interpreted
normally and the factorypath would be separate.
Comment 1 Jesse Glick 2008-09-16 16:06:08 UTC
Created attachment 69958 [details]
Patch to enable APs when compiling NBM projects
Comment 2 Jesse Glick 2008-09-16 16:06:54 UTC
Created attachment 69959 [details]
Demo application (suite project) using patch
Comment 3 Jesse Glick 2008-10-16 21:44:51 UTC
A note about the demo app: don't forget to set the custom platform to use its own harness, rather than the harness
bundled with your current IDE.
Comment 4 Jesse Glick 2008-10-16 21:51:56 UTC
Have a working implementation of this.
Comment 5 Jesse Glick 2008-10-16 21:58:48 UTC
Created attachment 72040 [details]
Refined patch to add 269 support
Comment 6 Jesse Glick 2008-11-01 16:51:05 UTC
Merged in core-main #78103b644dfc.
Comment 7 Quality Engineering 2008-11-04 16:27:56 UTC
Integrated into 'main-golden', will be available in build *200811041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a4c147bda4bf
User: Jesse Glick <jglick@netbeans.org>
Log: Issue #147393: support annotation processors in module build harness.
Comment 8 Quality Engineering 2008-11-05 04:35:28 UTC
Integrated into 'main-golden', will be available in build *200811050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2fb3293a0467
User: Jesse Glick <jglick@netbeans.org>
Log: More fixes to handling of APs in unit test code for #147393.
'ant clean test-build' was not running processors on test code, while 'ant clean netbeans && ant test-build' did.
Also getting rid of a -Xlint:path warning about missing test.*.cp.extra.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo