What’s next

July 12, 2008

Problems with IntelliJ AspectJ plugin – SOLVED

Filed under: Java — stigl @ 9:34 pm
Tags: , , , ,

I’ve looked into Oval Java Validation Framework, which seems quite nifty. The problem with it is that it doesn’t work right out of the box if you want the extra bonus features, such as pre and post validation. For that you need AspectJ support, and for that… Well, lets just say your learning curve put on some weight.

This post is regarding solving an issue you may get when trying to use IntelliJ’s AspectJ plugin. When running the test I’ve added here from IntelliJ, You get the message:

Error: ExactAnnotationTypePattern was written by a newer version of AspectJ

But, if I run Maven2 with “mvn clean install”, and then run the test again in IntelliJ, everything is ok.

I’ve posted a message to the owner of the plugin, so I’ll keep you informed on that progress. Until then, here’s the sample code which should be a breeze to browse.

Stats:
IntelliJ 7.0.3 build 7782
AspectJ weaver plugin v1.11
AspectJ 1.6.0

Update – issue solved

I contacted the maintainer of the IntelliJ AspectJWeaver plugin, Mattias Jiderhamn, and presented the issue.
I’m pleased to announce that the issue is now solved, and I can happily code aspectJ stuff from within IntelliJ. Hoorah!

Advertisements

3 Comments »

  1. I am getting started with aspectj and am looking for a small functioning example that works in intellij.

    Any help would be appreciated.

    Comment by Lee Mandell — December 3, 2008 @ 6:17 pm | Reply

  2. I used the oval-aspectj-maven-test from above. Just unzip, run “mvn test” to verify that it works and “mvn idea:idea -DdownloadSources” to set up the project. In addition, you have to set up the AspectJWeaver Plugin. I tested in IntelliJ 7.
    It might not be the simplest project to start with, but at least it’s backed by Maven so you have verification on if you’ve set up the plugin correctly.
    I don’t work with AspectJ on a regular basis, so any further recommendations are as good as googles, but projects using aspectj-maven-plugin have the brand of goodness as far as I care.

    http://ultimate-roundtrip.googlecode.com/files/oval-aspectj-maven-test.zip

    Comment by stigl — December 3, 2008 @ 10:04 pm | Reply

  3. Err, There’s a V2.0 which I didn’t notice. Can’t remember the difference, but guess newer means better! 🙂
    http://ultimate-roundtrip.googlecode.com/files/oval-aspectj-maven-test-v2.0.zip

    Comment by stigl — December 3, 2008 @ 10:11 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: