由于我添加了带有“src / main / java”的sourceDirectory标记作为路径,因此在编译期间编织某些方面时遇到了麻烦。之前“。”被设定了。现在这些方面都没有编织到类中。
...
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.6.7</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.6.7</version>
</dependency>
...
<build>
<sourceDirectory>src/main/java</sourceDirectory>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
<complianceLevel>1.6</complianceLevel>
<verbose>true</verbose>
</configuration>
</plugin>
...
</plugins>
</build>
似乎编织被跳过了。如果我设置“。”对于sourceDirectory,它将再次工作,aspectj将产生一些输出。
哦,伙计,这是星期五下午......
对于所有在同一问题上运行的人:
对不起那个人......
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<sources>
<source>
<basedir>src/main/java</basedir>
<includes>
<include>**/*.aj</include>
</includes>
</source>
</sources>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
<complianceLevel>1.6</complianceLevel>
<verbose>true</verbose>
<showWeaveInfo>true</showWeaveInfo>
</configuration>
</plugin>