2014-02-11 92 views
1

是否可以從AspectJ weaveDependencies中創建異常(即,要排除的內容)? 像下面大寫字母那樣的行嗎?從Maven aspectj中排除某些軟件包weave依賴關係

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

+0

可能: 它沒有雖然SOVE我的問題.. –

+0

你想從使用排除方面,或定義它不織布,應嘗試包? – sheltem

+0

定義未嘗試編織的軟件包 –

回答

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

此答案未解決上述問題 - 如果將此塊添加到中,則會出現語法錯誤。你可以使用這種形式來表示你希望從源代碼中排除的包中的包,甚至可以在你的pom的部分中排除不需要的瞬態依賴,但到目前爲止,AspectJ maven插件沒有支持這是試圖做的。 – JoshC13