如何使用aspectj-maven-plugin [英] How to use aspectj-maven-plugin

查看:1032
本文介绍了如何使用aspectj-maven-plugin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是AspectJ和Maven的新手。

I'm a newbie to AspectJ and Maven.

我正在尝试使用aspectj-maven-plugin来构建我的项目,但它不起作用。我只是按照 AspectJ In Action 2 nd Edition 中的步骤进行操作。

I'm trying to use aspectj-maven-plugin to build my project, but it does not work. I just followed the steps in AspectJ In Action 2nd Edition.

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>test-compile</goal>
                    </goals>

                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

以下是我在< execution> line:

Here's the error message I get on the <execution> line:


生命周期配置未涵盖的插件执行:org.codehaus.mojo:aspectj-maven-plugin:1.4:编译(执行:默认,阶段:编译)

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.4:compile (execution: default, phase: compile)

我正在使用JDK6和Apache Maven 3.0.4。

I'm using JDK6 and Apache Maven 3.0.4.

推荐答案

您需要安装AspectJ Maven配置程序。可在此处获取:

You need to install the AspectJ Maven configurator. It is available here:

http: //dist.springsource.org/release/AJDT/configurator/

帮助 - >安装新软件......

Help -> Install new software...

将此更新站点添加到使用部分并选择该功能。

Add this update site to the "work with" section and select the feature.

这篇关于如何使用aspectj-maven-plugin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆