[aspectwerkz-user] running AW 2.0 with maven 1.2

Agustin Ramos <[email protected]>
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
Hi

Does anyone know how to use AW2.0 seamesly with maven?
The maven plugin is targeted at AW0.9. So I defined an ant compile postGoal
within maven.xml using the AspectWerkzCTask. This required me to add
trove, dom4j, asm, asm-attrs, asm-utils, and jrexx  as project dependencies.

  <goal name="aspectwerkz:weave">
    <ant:taskdef name="awc"
               
classname="org.codehaus.aspectwerkz.compiler.AspectWerkzCTask">
      <ant:classpath>
        <ant:path refid="maven.dependency.classpath"/>
      </ant:classpath>
    </ant:taskdef>
    <awc verbose="true"
         definition="${maven.src.dir}/conf/aop.xml">
      <ant:classpath>
        <ant:path refid="maven.dependency.classpath"/>
      </ant:classpath>
      <ant:target path="${maven.build.dir}/classes"/>
    </awc>
  </goal>

The problem is when I try to run my junit tests, I get something like

******************************************************************
* ClassLoader = sun.misc.Launcher$ExtClassLoader@f38798@15959960
* SystemID = virtual_15959960, 1 aspects.
******************************************************************
AW::WARNING - could not load class 
[./my...package...name/aop/TracingAspect] as a resource in loader 
[sun.misc.Launcher$AppClassLoader@12f6684]
Warning: could not load aspect mypackagename.aop.TracingAspect from 
sun.misc.Launcher$AppClassLoader@12f6684due to: java.io.IOException: 
Class not found

And so for every aspect class I defined.
Does anyone knows how to fix these or if there's a better way to use AW 
within maven?

Thanks.
Agustín.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.