AJDT and Ant


I’ve just had one of those mornings where you spend hours trying to crack a problem and just getting nowhere.

The problem was getting AspectJ to work under Ant but only by using the AJDT 1.6.3 Eclipse plugin.

Unfortunately, this is very poorly documented. Fortunately, this helps you make the right decision: don’t use AspectJ in Ant by relying on AJDT.

There is a very good reason for this (beyond it being hard to get working): you cannot rely on AJDT being available when compiling in anything other than Eclipse (e.g. from a CI server).

What’s the alternative? Download AspectJ and use these libraries directly in Ant – they’re well documented and just work.

About these ads

3 Responses to AJDT and Ant

  1. Andrew Flegg says:

    Why were you trying to use AJDT from Ant? Is this the time when you wish you could have a look at application-build.xml? ;-)

  2. colinhowe says:

    Heh, it was one of those times when I thought “I know exactly where this has been solved before… I just can’t look at it!”

    I was trying to use AJDT from Ant because I had AJDT installed and a quick Google made me believe it should be possible – but it looks like it isn’t! Then I got into one of those patterns of just trying to hack away at it and needed to take a step back.

    Hopefully this posting will come up in anyone searching similar things to what I was searching this morning :-)

  3. gMale says:

    I agree AJDT + Ant = bad news. I’ve been wrestling with a bug for about 5 days that is rooted in AJDT overwriting my iajc task, giving only the cryptic error “trying to override old definition of task iajc” before failing. I’m currently trying to figure out how to get Eclipse to ignore AJDT jars when it comes to Ant. This is so aggravating. For now, I just have to run Ant from the command line…

Leave a Reply

Fill in your details below or click an icon to log in:

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: