I am trying to add aspectj to a maven project using java 6.0. Browsing around I found 2 maven plugins, none of which works the way I would expect.
The first one http://mojo.codehaus.org/aspectj-maven-plugin did not work at first through netbeans because I could not get the code to compile 5.0 or later source (it complained about annotations etc.) After trying from command line which worked and comparing the commands executed it seems that its mavens install goal that is not compatible with the plugin and java 5+ code while the compile goal works fine. Although it may be possible to work around this it is annoying and brings me to the question: is the aspectj-maven-plugin still being developed? Should I still use it?
The second one is apaches's own which seems more active and more likely to work. I can however not find any complete examples and I am unable to run it. I keep getting an exception from maven:
java.lang.IllegalStateException: The plugin descriptor for the plugin Plugin [maven:maven-aspectj-plugin] was not found. Please verify that the plugin JAR /home/kristofer/.m2/repository/maven/maven-aspectj-plugin/4.0/maven-aspectj-plugin-4.0.jar is intact.
The jar file is there, intact and it also doesn't matter which version of the plugin I use, it always throws the same exception. Any ideas on what the problem might be?
In short, which plugin and how should I use it?
Thanks