What I did that work:

1. Create an aspects bundle which contains the duplicate code.  I compile
the code with the aspectj-maven-plugin.
     <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>

2. In the client bundle, add the aspect bundle as an dependency.  When you
compile your project, specify this aspect bundle.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<aspectLibraries>
<aspectLibrary>
<groupId>yourGroupId</groupId>
<artifactId>yourAspectBundle</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
</plugin>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to