You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Randy Xu <r...@post.harvard.edu> on 2005/02/02 19:52:51 UTC

Problem with aspectj destination

Is anyone here knowledgeable about aspectj and the plugin?

When we used ANT, we used the aspectj compiler by running the following 
instead of just javac:

    <javac
        nowarn="${javac.nowarn}"
        debug="${javac.debug}"
        optimize="${javac.optimize}"
        deprecation="${javac.deprecation}"
        target="${javac.target}"
        verbose="${javac.verbose}"
        depend="${javac.depend}"
        fork="${javac.fork}"
        memoryInitialSize="${javac.memory.initial.size}"
        memoryMaximumSize="${javac.memory.maximum.size}"
        failonerror="${javac.fail.on.error}"
        destdir="${dest.dir}"
        classpathref="lib.classpath.ref">
      <src path="${src.dir}"/>
        <compilerarg compiler="${ajc}" line="-Xreweavable -Xsrcdir 
${src.dir}/aspectj"/>
      </javac>

Now I'm using the aspectj plugin and trusting it to do everything.  I 
put my aspects in 'src/aspectj'.

1) Everything works when I run aspectj by itself or as the first command 
in <preGoal name="java:compile">, but not when I add the additional step 
of changing maven.build.dest before calling aspectj.  In development 
mode, we want to directly compile our classes to a directory in our 
application server.  I changed plugin.jelly to output debug information 
and it seems to pick up the new maven.build.dest fine.  But when it 
runs, it complains that all the classes it needs to weave cannot be found.

2) The general question I have is whether java:compile also gets run if 
aspectj is run.  It seems that aspectj compiles all the classes already 
- if it is a preGoal to java:compile, does this mean that we also run 
java:compile?

-Randy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org