Unittesting pomless AspectJ项目

问题描述 投票:0回答:1

在Tycho版本中,我有一个pomless插件项目/捆绑软件A,其中包含一些Aspectj类(* .aj)。该项目构建良好,另一个项目B可以通过manifest.mf引用项目A。现在,存在一个用于测试项目A的单独的单元测试项目C。该单元测试项目C旨在使用标准pom.xml和maven-surefire(C中不存在manifest.mf)构建。

问题是,C无法找到项目A的* .aj类。如果我在项目A中使用maven-aspectj-plugin引入pom.xml,则可以构建A,而C可以​​在A中找到所需的任何东西。但是项目B找不到捆绑软件A。是否有解决此问题的建议?

我是Tycho的新手,我认为问题出在项目A中的无pom方法和单元测试C中的基于pom的方法的混合。是否有可能构建上述的单一项目C pom基于还是我需要用tycho-surefire构建它?

我发现了这个相关问题Aspectj class is not found by test class when running test with maven但这对我没有帮助。

提前感谢。

aspectj tycho aspectj-maven-plugin tycho-surefire-plugin
1个回答
0
投票

pom.xml应该在项目A中使用,打包类型为eclipse-plugin,未设置依赖项,并且AspectJ-maven-plugin的常规插件设置为

© www.soinside.com 2019 - 2024. All rights reserved.