You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Charles Daniels <cj...@yahoo.com> on 2004/12/01 15:30:11 UTC

Aspectj IMessageHolder ignored by Maven

Hi All,

Unfortunately, the AspectJ plugin for Maven does not support
specification of an IMessageHolder implementation via the
messageHolderClass attribute of the iajc Ant task.  Therefore, I have
added a goal to my maven.xml file that calls the iajc Ant task with the
attribute, specifying my custom IMessageHolder implementation.  Here is
what it looks like:

  <goal name="weave" prereqs="java:compile">
    <taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
      <classpath refid="maven.dependency.classpath"/>
    </taskdef>

    <iajc
      messageHolderClass="com.mypackage.MyMessageHolder"
      classpathRef="maven.dependency.classpath"
      debug="true"
      deprecation="true"
      destdir="target/woven-classes"
      failonerror="false">
      
      <sourceroots>
        <pathelement location="src/java"/>
        <pathelement location="src/aspects"/>
      </sourceroots>
    </iajc>
  </goal>

The problem is that MyMessageHolder is never used by the iajc task.
Even if I change the class name to some class that does not exist, I
never get a ClassNotFoundException.  However, if I create an Ant target
containing this identical task, MyMessageHolder *is* used, and if I
specify a non-existent class, I get a ClassNotFoundException.

Any ideas on why I am seeing behavior in Maven that is different from
Ant for an identically configured task?

Cheers,
Chuck


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