Skip to content

Commit 6e28a9f

Browse files
committed
Move AspectJ Maven executions to default phases
Document the pros and cons in the POM with this comment: Attention: aspectj-maven-plugin MUST be declared AFTER maven-compiler-plugin, if they are both supposed to run in the same default phases 'compile' and 'test-compile', but execution order is to be guaranteed. Then, you have the convenience of being able to run e.g. 'mvn [clean] compile' instead of 'mvn [clean] process-classes'. For a slightly less convenient, but less refactoring-error-prone solution, see the commented-out phases below.
1 parent 9c57863 commit 6e28a9f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

spring-data-jpa/pom.xml

+8-2
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@
357357
</configuration>
358358
</plugin>
359359

360+
<!--
361+
Attention: aspectj-maven-plugin MUST be declared AFTER maven-compiler-plugin, if they are both supposed to run
362+
in the same default phases 'compile' and 'test-compile', but execution order is to be guaranteed. Then, you have
363+
the convenience of being able to run e.g. 'mvn [clean] compile' instead of 'mvn [clean] process-classes'. For a
364+
slightly less convenient, but less refactoring-error-prone solution, see the commented-out phases below.
365+
-->
360366
<plugin>
361367
<groupId>org.codehaus.mojo</groupId>
362368
<artifactId>aspectj-maven-plugin</artifactId>
@@ -374,14 +380,14 @@
374380
<goals>
375381
<goal>compile</goal>
376382
</goals>
377-
<phase>process-classes</phase>
383+
<!--<phase>process-classes</phase>-->
378384
</execution>
379385
<execution>
380386
<id>aspectj-test-compile</id>
381387
<goals>
382388
<goal>test-compile</goal>
383389
</goals>
384-
<phase>process-test-classes</phase>
390+
<!--<phase>process-test-classes</phase>-->
385391
</execution>
386392
</executions>
387393
<configuration>

0 commit comments

Comments
 (0)