mapstruct / mapstruct-examples

Examples for using MapStruct
Other
1.28k stars 511 forks source link

Mapstruct issue on Eclipse (1.4.2.Final) #120

Open sayseakleng opened 3 years ago

sayseakleng commented 3 years ago

I have an issue to setup Mapstruct on eclipse (Version: 2021-03 (4.19.0), Build id: 20210312-0638) with following gradle setting:

implementation "org.mapstruct:mapstruct:$mapstructVersion" annotationProcessor "org.mapstruct:mapstruct-processor:$mapstructVersion" annotationProcessor "org.projectlombok:lombok-mapstruct-binding:0.2.0" annotationProcessor "org.projectlombok:lombok" annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"

It seems it doesn't generate .factorypath when I tried to run gradle tasks: cleanEclipse and eclipse It works and everything is fine if I add follow gradle plugin:

plugins { id 'java' id 'eclipse-wtp' id 'org.springframework.boot' version '2.3.12.RELEASE' id 'io.franzbecker.gradle-lombok' version '4.0.0' id 'net.ltgt.apt-eclipse' version '0.21' }

But there is a drawback that this net.ltgt.apt-eclipse doesn't work on gradle 7.1.1 and I need to use the older version gradle-6.9 However developers like me prefer to install MapStruct Eclipse Plugin and it's supposed to make things work around without require developers to add net.ltgt.apt-eclipse

I look forward to this potential fix.

Regards.