从Maven aspectj weavedependencies中排除某些包

时间:2014-02-11 09:19:39

标签: maven package aspectj compile-time-weaving

是否可以从AspectJ weaveDependencies中生成异常(即要排除的内容)? 像下面用大写字母的行?

<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>

1 个答案:

答案 0 :(得分:1)

<excludes>
             <exclude>**/gaffer/*.java</exclude>
              <exclude>**/gaffer/**.java</exclude>
       </excludes>