MapStructのサポートについては、Eclipseをご覧ください。
プロパティにm2e_apt
を追加する必要があります。
<properties>
<!-- automatically run annotation processors within the incremental compilation -->
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
</properties>
また、mavenコンパイラを正しくセットアップしていることを確認してください。
maven-compiler-pluginのオプションannotationProcessorPaths
を使用することをお勧めします(これを使用して、コンパイルパス上のmapstructプロセッサをリークさせません)。
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.6</source> <!-- or higher, depending on your project -->
<target>1.6</target> <!-- or higher, depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>