Community
Participate
Working Groups
Build Identifier: 20110218-0911 Annotations can generate files when they are processed by the compiler, however when they are executed via buckminster either these files are not generated or they are not included in the resulting jar file. When a plugin project is exported as "Plugin Development/Deployable Plugins and Fragments", the file(s) generated by the annotation(s) are included in the resulting jar file, these generated files are also included when manually building a legacy site. When a plugin project is exported using buckminster 'site.p2' or 'bundle.jar' these files are not included in the resulting jar file(s). It is not clear if the annotation is being executed at all. Reproducible: Always Steps to Reproduce: 1. Import the attached org.demo.demoplugin project. 2. Right click, buckminster->invoke action. 3. Select bundle.jar and a properties file specifying an output location. 4. Inspect the generated jar file, it should contain a file: META-INF/services/java.lang.String For comparison export as 'Depoyable Plugins and Fragments'.
Created attachment 191175 [details] Zip containing annotation source project + org.demo.demosite project referened in the original bug report.
Buckminster performs a normal workspace build. That build doesn't produce the META-INF/services folder. My guess would be that this is because the tooling doesn't have the annotation bundle on its classpath. When you build using pde export, it will first create an ant-script. From that ant-script, it will call the Java compiler. That is a different compiler instance, i.e. it's not the same compiler as is used in the workspace. Consequently, it can be fed with classpath entries from other stuff that the workspace compiler has created. I bet that if you install the annotationprocessor into your IDE (and hence into Bucky), the services folder will appear right there, in your workspace and it will be maintained while you work with your classpaths.
This bug turns out to be a duplicate. *** This bug has been marked as a duplicate of bug 280542 ***
and that duplicate also points to the solution: http://code.google.com/p/spi/wiki/EclipseSettings Once you've configured the project specific settings according to that wiki page, the correct entry is generated under the output folder (i.e. bin/META-INF) and also included in the jar built by bundle.jar.