1

Is it possible to make an exception (i.e. something to be excluded ) from AspectJ weaveDependencies? Something like the line with capital letters below?

<build>
<plugins>
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>aspectj-maven-plugin</artifactId>
    <version>1.5</version>
    <configuration>
      <weaveDependencies>
        <weaveDependency>
          <groupId>org.agroup</groupId>
          <artifactId>to-weave</artifactId>

          ***<EXCLUDE>WE.DONT.NEED.THIS.SUB.PACKAGE </EXCLUDE>***

        </weaveDependency>

      </weaveDependencies>
    </configuration>
    <executions>
      <execution>
        <goals>
          <goal>compile</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
  ...
</plugins>

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Sanyifejű
  • 2,610
  • 10
  • 46
  • 73

1 Answers1

1
<excludes>
             <exclude>**/gaffer/*.java</exclude>
              <exclude>**/gaffer/**.java</exclude>
       </excludes>  
Sanyifejű
  • 2,610
  • 10
  • 46
  • 73
  • 1
    This answer doesn't address the question above - if you add this block to a , you'll get a syntax error. You can use in the form you gave to denote packages in your source code you wish to exclude from weaving, and can even exclude unwanted transient dependencies in the section of your pom, but so far the AspectJ maven plugin doesn't support what this is trying to do. – josh-cain May 15 '15 at 12:47