I'm trying to use Intellij 2017 Ultimate to build/run a Spring Boot application that uses MapStruct. It is a Gradle project. My issue is that IntelliJ does not seem to run the MapStruct Annotation Processor. I realize that I can configure IntelliJ to delegate to the Gradle build process (see this), but I am hoping to simply configure IntelliJ to use APT to generate the necessary classes itself.
I have enabled APT for my project, but my classes are still not generated.
build.gradle (applicable snippets):
ext {
mapstructVersion = '1.2.0.Final'
}
plugins {
id 'net.ltgt.apt' version '0.15'
}
dependencies {
// MapStruct support
implementation group: 'org.mapstruct', name: 'mapstruct-jdk8', version: mapstructVersion
annotationProcessor group: 'org.mapstruct', name: 'mapstruct-processor', version: mapstructVersion
}
IntelliJ configuration:
Yet, when I do a ./gradle clean
followed by a Build->Rebuild Project, my out/production/classes/generated folder is empty.
Is there something additional that I need to do to enable APT on this project? Should IntelliJ automatically detect the mapstruct annotation processor in the classpath?