Shouldn't aspectj be called as a preGoal of java:compile? I would also try to upgrade to Maven 1.1-beta-3, a lot has changed between beta-2 and beta-3!

HTH,
-Lukas


Orford, Ian wrote:
I'm using Maven 1.1-beta-2. I recently had to upgrade the aspectj plugin to
version 4.0 because I was getting a compile error and needed to use aspectj
1.5.

I've got the standard post-goal hool in my maven.xml file...
    <postGoal name="java:compile">
        <attainGoal name="aspectj"/>
    </postGoal>


If I compile using "maven test" it works fine. However if I use "maven site"
it seems to get stuck in a loop. I've looked at the jelly for the plugin and
it seems to be recursively calling the java:compile goal in the
aspectj:test-compile goal. The piece of code is:
      <j:choose>
        <j:when test="${context.getVariable('maven.aspectj.dest') == null}">
          <j:set var="maven.aspectj.dest" value="${maven.build.dest}"/>
        </j:when>
        <j:otherwise>
                <ant:echo>imo:attaining java:compile goal</ant:echo>
          <attainGoal name="java:compile"/>
                <ant:echo>imo:finished java:compile goal</ant:echo>
          <ant:path id="build.dest" location="${maven.build.dest}"/>
          <maven:addPath id="maven.dependency.classpath"
refid="build.dest"/>
        </j:otherwise>
      </j:choose>

So, it's clear that when building "site", "maven.aspectj.dest" isnt setup. I
tried adding
        maven.aspectj.dest = ${maven.build.dest}
In my project.properties, but it didn't help.

The aspectj related properties I have set are:
        maven.aspectj.source=1.4
        maven.aspectj.lint=ignore
        maven.aspectj.maxmem=512m
        maven.aspectj.fork=true


I include output from "maven test" and "maven site" below.

Any help appreciated,

Regards,
Ian Orford



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to