You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background: One of my users reported an error when compiling a project that uses one particular feature in MapStruct Spring Extensions using Eclipse. Turns out that ECJ handles one part of the annotation processing differently to Javac (but still spec-compliant). So obviously I'd like to fix this and found this plugin which I'd like to help me in reproducing the error. However, it already fails on a previous hurdle. I configured it in this example.
Building the example results in this error:
> Task :examples:external-conversions:compileJava FAILED
----------
1. ERROR in /Users/raimundklein/development/GitHub/mapstruct-spring-extension/examples/external-conversions/src/main/java/org/mapstruct/extensions/spring/example/externalconversions/LocaleInfoDtoMapper.java (at line 6)
@Mapper(config = MapstructConfig.class, uses = ConversionServiceAdapter.class)
^^^^^^^^^^^^^^^^^^^^^^^^
ConversionServiceAdapter cannot be resolved to a type
----------
1 problem (1 error)
The "missing" class is generated during annotation processing. Please note that this part works well inside Eclipse if I remove the @ExternalConversion section which is the one reported as erroneous. If I remove the plugin and use Javac instead, everything is fine. Do I need to add another line for annotation processing, and if so which one?
The text was updated successfully, but these errors were encountered:
Hi @Chessray,
I reproduced the issue and can confirm that annotation processors do not work correctly with this plugin. Specifically, no code is generated despite the processors being recognized. I don't know what is causing this issue yet and, unfortunately, I probably won't get around to investigating this until the end of the month.
I've found that a quick (but dirty) fix might be adding the processor to the compileOnly configuration. So, for example
Hello,
Thank you for providing this plugin.
Background: One of my users reported an error when compiling a project that uses one particular feature in MapStruct Spring Extensions using Eclipse. Turns out that ECJ handles one part of the annotation processing differently to Javac (but still spec-compliant). So obviously I'd like to fix this and found this plugin which I'd like to help me in reproducing the error. However, it already fails on a previous hurdle. I configured it in this example.
Building the example results in this error:
The "missing" class is generated during annotation processing. Please note that this part works well inside Eclipse if I remove the
@ExternalConversion
section which is the one reported as erroneous. If I remove the plugin and use Javac instead, everything is fine. Do I need to add another line for annotation processing, and if so which one?The text was updated successfully, but these errors were encountered: