Home > front end >  Mapstruct compile only changed files with maven
Mapstruct compile only changed files with maven

Time:03-05

is there a way to clean and compile only changed classes when working with mapstruct and maven? For example, in my project I have lots of mapstruct interfaces which, once compiled, generates implementations in the target folder. but I need to avoid re-compiling those classes that i didn't change to ensure a fastest build. Thanks in advance.

CodePudding user response:

The recompile of the project didn't run the annotation processor. MapStruct is invoked by the Java compiler and the maven-compiler-plugin is responsible for cleaning up the folder with the generated classes, thus it will go through all mapper interfaces.

CodePudding user response:

Set "Build Automatically" on in your IDE. If you're using Eclipse it's located at the top in "Project".

  • Related