AspectJ in Maven-Projekt, funktioniert nicht / Weben

Ich versuche, das AspectJ-Weben in einem einfachen Maven-Projekt zum Laufen zu bringen, und bin mir nicht sicher, wo es schief geht: Wenn ich den Code mit "mvn exec: java" ausführe, sehe ich keine erwartete Ausgabe.

Ich bin sicher, dass der Code funktioniert, weil ich das gleiche in STS versucht habe, wo es gut funktioniert. Ich wollte nur, dass das AspectJ in einem Maven-Projekt funktioniert.

Hinweise zum Debuggen dieser Art von Problemen werden sehr geschätzt.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.aop</groupId>
<artifactId>aop1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>aop1</name>
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>1.7.3</version> <!-- specify your version -->
    </dependency>
</dependencies>

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <source>1.7</source>
                            <target>1.7</target>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <outxml>true</outxml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <mainClass>com.aop.aop1.App</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

Aspekt-Datei im selben Ordner wie Code:

    package com.aop.aop1;


public aspect aspect {

    pointcut secureAccess()
        : execution(* *.foo(..));

    before() : secureAccess() {
        System.out.println("BEHOLD the power of AOP !!!");
    }
}

Java-Datei:

package com.aop.aop1;
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        foo();
    }
    public static void foo() {
        System.out.println(" IN FOO.");
    }
}

Antworten auf die Frage(1)

Ihre Antwort auf die Frage