I am trying to add AspectJ to my existing Tycho based application, and it appears that the build doesn't see my jar libraries now — am getting a lot of "The import ... cannot be resolved" and similar compilation errors.
Each module in the project has some jar libraries that are attached to them in their build.properties
files as is usual for RCP/Tycho-based apps, and it looks as these libraries are not resolved after I add AspectJ to the build for some reason.
What I did is added AspectJ to my parent project's pom.xml
file as described in this question. I'm getting such build errors now:
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[ERROR] The import org.mozilla cannot be resolved
C:\Projects\TychoProject\com.myapp.common\src\com\myapp\common\scripting\Exec.java:7
import org.mozilla.javascript.Context;
^^^^^^^^^^
[ERROR] The import org.mozilla cannot be resolved
C:\Projects\TychoProject\com.myapp.common\src\com\myapp\common\scripting\Exec.java:8
import org.mozilla.javascript.EcmaError;
^^^^^^^^^^
...
The rhino.jar
library that contains these org.mozilla.*
classes is located in a folder that is referred to in the respective module's build.properties
file (lib-external/
below):
source.com.myapp.common.jar = src/
output.com.myapp.common.jar = bin/
bin.includes = META-INF/,\
com.myap.common.jar,\
lib/,\
lib-external/,\
plugin.properties
javacSource=1.7
javacTarget=1.7
This compiles well without AspectJ. How can this be fixed to work with AspectJ as well, what I might be missing?