【问题标题】:Excluding certain packages from Maven aspectj weavedependencies从 Maven aspectj weavedependencies 中排除某些包
【发布时间】:2014-03-08 23:45:46
【问题描述】:

是否可以从 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>

【问题讨论】:

  • 也许: 不过它并没有解决我的问题..
  • 您想排除使用的方面,还是定义不应尝试编织的包?
  • 定义不尝试编织的包

标签: maven package aspectj compile-time-weaving


【解决方案1】:
<excludes>
             <exclude>**/gaffer/*.java</exclude>
              <exclude>**/gaffer/**.java</exclude>
       </excludes>  

【讨论】:

  • 这个答案没有解决上面的问题——如果你把这个 块添加到 ,你会得到一个语法错误。您可以使用 以您提供的形式表示您希望从编织中排除的源代码中的包,甚至可以在您的 pom 的 部分中排除不需要的临时依赖项,但到目前为止 AspectJ maven 插件没有'不支持这是试图做什么。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2020-03-06
  • 1970-01-01
  • 1970-01-01
  • 2018-09-27
  • 1970-01-01
  • 2023-03-12
  • 2021-03-31
相关资源
最近更新 更多