Skip to content

Plugin doesn't detect recompiled files #15

@odrotbohm

Description

@odrotbohm

The Maven compiler plugin currently always recompiles sources, even if there have been any changes at all (see these tickets for details). That recompilation however is not recognized by the AspectJ Maven plugin and it just skips AspectJ compilation on subsequent runs.

To reproduce:

$ git clone https://github.com/spring-projects/spring-data-jpa
$ cd spring-data-jpa
$ mvn clean package -DskipTests
…
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ spring-data-jpa ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 101 source files to /Users/olivergierke/Documents/workspace/spring-data-jpa/target/classes
… 
[INFO] --- aspectj-maven-plugin:1.8:compile (default) @ spring-data-jpa ---
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[WARNING] You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
Your processor is: org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.BatchProcessingEnvImpl
Lombok supports: sun/apple javac 1.6, ECJ
    <unknown source file>:<no line information>
[INFO]
$ mvn package -DskipTests
…
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ spring-data-jpa ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 101 source files to /Users/olivergierke/Documents/workspace/spring-data-jpa/target/classes
…
[INFO] --- aspectj-maven-plugin:1.8:compile (default) @ spring-data-jpa ---
[INFO] No modifications found skipping aspectJ compile
…

See the last line. The plugin skips the compilation step although the compiler plugin has recompiled the code and we end up with classes that haven't got any aspects applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions