Re: [aspectwerkz-user] running AW 2.0 with maven 1.2
John Casey <[email protected]>
| Newsgroups | gmane.text.xml.cocoon.user,gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <425F2D27.7020402__48791.1024982624$1113533574$gmane$org@commonjava.org> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry, when I said to send a message to the users list, I meant to send it to [email protected] :) (I talked to you on IRC, I think?) I'm going to cross-post this, just to see if it conjurs any more help for you. HTH, john Agustin Ramos wrote: > 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. > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFCXy0nK3h2CZwO/4URAjzvAJ4lLSsS8EIt3wr3yXReNOas3Qsh2QCgiU69 8WQE6FK0ZnIYemeJRd50RR8= =n1Bc -----END PGP SIGNATURE-----