I have an annotation processor which shall generate a enumeration with the keys defined by getter methods of an interface.
The interface resides in
MyProject/src/main/java/my.package.MyInterfaces.java.
I want to validate the properties files which reside in MyProject/src/main/resources/META-INF/resource-bundle/
if they do contain the keys defined in the generated enum.
My problem is that the properties files are not available via the classloader of the processor or via Filer.getResource(...).
How can I make the source or classpath of this project available to the processor, so that I can load the properties files ?
Now I have only the resources within the jar where the processor resides available. I did try to define -classpath and/or -sourcepath via eclipse Project/Properties/Java compiler/Annotation processing/Processor options but it did not work out.
Has anyone faced an issue like this, and can anyone give me a clue as to how I can make the resources available for the processor?
I do have the maven structure but do not use maven, because of old dependencies within the application. So maven is now not an option for me.
Eclipse 3.6 Helios Seems that
StandardLocation.SOURCE_PATH
andStandardLocation.CLASS_PATH
are not implemented in Filer#getResource(), so writing generated source or class files toSOURCE_PATH
orCLASS_PATH
seems not be possible, also accessing any files onSOURCE_PATH
andCLASS_PATH
*
Thanks.