0

我正在与aspectj-maven-plugin. 我只需要它进行单元测试。

您可以在下面看到我的插件配置(父 POM 中没有定义配置,我已经检查了“有效 POM”)。

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<executions>
    <execution>
        <id>default-compile</id>
        <phase>compile</phase>
        <goals>
            <goal>test-compile</goal>
        </goals>
    </execution>
</executions>
</plugin>

但是,每当我尝试 amvn clean deploymvn clean test由于跳过插件执行而出现编译错误时:

[INFO] --- aspectj-maven-plugin:1.4:test-compile (default-compile) @ jcz-persistence-aspectj ---
[INFO] Skipping execution because of 'skip' option

欢迎提出任何建议!

斯特凡诺

4

1 回答 1

0

您正在尝试进行test-compile。它将单独编织测试类。尝试使用 just compile作为目标。

        <executions>
            <execution>
                <goals>
                    <goal>compile</goal>
                </goals>
            </execution>
        </executions>
于 2012-12-13T05:18:34.327 回答