Hi, 

I´ve created an "aspectJ" build module, to weave some "monitoring aspects" 
into an existing jar:

<project... >
        ...
        <groupId>org.agroup</groupId>
        <artifactId>to-weave-enhanced</artifactId>
        ...

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>aspectj-maven-plugin</artifactId>

<configuration>
        ... 
          <weaveDependencies>
        <weaveDependency>
                <groupId>org.agroup</groupId>
                <artifactId>to-weave</artifactId>
        </weaveDependency>
          </weaveDependencies>
        ... 
</configuration>

</plugin>

<dependencies>
        ...
        <!-- for AspectJ jar weaving -->
        <dependency>
                <groupId>org.agroup</groupId>
                <artifactId>to-weave</artifactId>
                <version>1.0</version>
        </dependency>
        ...
</dependencies>

This all works fine, but I have 2 issues open:

(1) When using the "enhanced" jar as a dependency in other projects, I 
need an exclusion of the original jar:

        <dependency>
        <groupId>org.agroup</groupId>
        <artifactId>to-weave-enhanced</artifactId>
        <exclusions>
                <exclusion>
                        <groupId>org.agroup</groupId>
                        <artifactId>to-weave</artifactId>
                </exclusion>
        <exclusions>
        <dependency>

otherwise I´ll have both jars in my classpath, because of the transitive 
dependencies.....
Is there a way to come around this?

(2) When using the "enhanced" jar as a dependency in other projects, I 
have no more debug information left:
        The sources jar of "org.agroup.to-weave-enhanced" contains no 
sources but the aspects, 
        the sources jar of "org.agroup.to-weave" isn´t used, because it´s 
not in the classpath anymore.....

        How can I resolve that and enable debugging when working with a 
"weaved jar"?

thanx for any advice, 

Torsten

Reply via email to