Hi,
I'm trying to move my projects from Ant to Maven2. The maven-jbossaop-plugin is 
only compatible with jbossaop 2.0.x so I was wondering how someone else solved 
this problem.

At the moment I try to test everything with a very simple project that only 
consists of a Servlet. The jboss-aop.xml is ok, I just need to know how to 
trigger the code-weaving from within maven.

That's what I have so far...
pom.xml:
 
  |     <build>
  |             <finalName>aop-test</finalName>
  |             <plugins>
  |                     <plugin>
  |                             <artifactId>maven-antrun-plugin</artifactId>
  |                             <executions>
  |                                     <execution>
  |                                             <phase>package</phase>
  |                                             <configuration>
  |                                                     <tasks>
  | 
  |                                                             <ant 
antfile="build.xml">
  |                                                                     <target 
name="aopc" />
  |                                                             </ant>
  | 
  |                                                     </tasks>
  |                                             </configuration>
  |                                             <goals>
  |                                                     <goal>run</goal>
  |                                             </goals>
  |                                     </execution>
  |                             </executions>
  |                     </plugin>
  |             </plugins>
  |     </build>
  | 

build.xml:

  | 
  | <project name="aoptest" default="aopc" basedir=".">
  |     
  |     <path id="maven-ant-tasks.classpath" 
path="build-lib/maven-ant-tasks-2.0.9.jar" />
  |     
  |     <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
  |                uri="urn:maven-artifact-ant"
  |                classpathref="maven-ant-tasks.classpath" />
  | 
  |     <artifact:dependencies pathId="dependency.classpath" 
xmlns:artifact="urn:maven-artifact-ant">
  |             <dependency groupId="jboss.aop" artifactId="jboss-aop-jdk50" 
version="1.5.6.GA" scope="compile"/>
  |     </artifact:dependencies>
  |     
  |     <taskdef name="aopc" classname="org.jboss.aop.ant.AopC" 
classpathref="maven-ant-tasks.classpath" />
  | 
  |     <target name="aopc" >
  |             <aopc compilerclasspathref="dependency.classpath" 
verbose="false">
  |                     <classpath path="target/classes" />
  |                     <src path="target" />
  |                     <aoppath path="src/main/resources/jboss-aop.xml" />
  |                     <aopclasspath path="${jboss.home}/lib" />
  |             </aopc>
  |     </target>
  | 
  | </project>
  | 


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222985#4222985

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222985
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to