Skip to content

Commit ebf31dd

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-errror-prone solution, see the commented-out phases below.
1 parent 7fb695c commit ebf31dd

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
@@ -415,6 +415,12 @@
415415
</configuration>
416416
</plugin>
417417

418+
<!--
419+
Attention: aspectj-maven-plugin MUST be declared AFTER maven-compiler-plugin, if they are both supposed to run
420+
in the same default phases 'compile' and 'test-compile', but execution order is to be guaranteed. Then, you have
421+
the convenience of being able to run e.g. 'mvn [clean] compile' instead of 'mvn [clean] process-classes'. For a
422+
slightly less convenient, but less refactoring-errror-prone solution, see the commented-out phases below.
423+
-->
418424
<plugin>
419425
<groupId>org.codehaus.mojo</groupId>
420426
<artifactId>aspectj-maven-plugin</artifactId>
@@ -432,14 +438,14 @@
432438
<goals>
433439
<goal>compile</goal>
434440
</goals>
435-
<phase>process-classes</phase>
441+
<!--<phase>process-classes</phase>-->
436442
</execution>
437443
<execution>
438444
<id>aspectj-test-compile</id>
439445
<goals>
440446
<goal>test-compile</goal>
441447
</goals>
442-
<phase>process-test-classes</phase>
448+
<!--<phase>process-test-classes</phase>-->
443449
</execution>
444450
</executions>
445451
<configuration>

0 commit comments

Comments
 (0)