jonnyzzz / IDEA.Dependencies

A plugin to analyze/remove unused dependencies between IntelliJ project modules
Apache License 2.0
5 stars 1 forks source link

AspectJ runtime library (aspectjrt.jar) is false positive #18

Closed kriegaex closed 10 years ago

kriegaex commented 10 years ago

I have analysed a very simplle Maven project in IDEA 13 with plugin v1.0.9. The project uses AspectJ and has a corresponding dependency declared on aspectjrt.jar. It is suggested to be removed, but if I do, the project does not compile anymore in IDEA.

image

jonnyzzz commented 10 years ago

Could you please attach the sample project for me to test. Does IntelliJ resolves into aspectJ?

kriegaex commented 10 years ago

https://github.com/kriegaex/Galileo-Openbook-Cleaner

Does IntelliJ resolves into aspectJ?

I do not understand that question.

jonnyzzz commented 10 years ago

I was wondering if you have AspectJ plugin enabled in your IntellijJ instance. Or do you see IntelliJ understands the code references in the .aj files?

I tried your sample locally. It looks like you do not have any code dependency to the AspectJ runtime jars. But you do have runtime dependency to the runtime, since generated code uses it. It that right?

If yes, this means you may mark this dependency as <scope>runtime</scope> in the maven. Runtime dependencies are not removed/processed by the plugin.

kriegaex commented 10 years ago

Yeah sure, AspectJ support is active in IDEA.

Your are right about the runtime dependency. Thanks for looking into this.