Setting the generated source directory for annotation processors in Maven

前端 未结 7 1372
南方客
南方客 2021-02-09 20:01

I\'m trying to move a build which generates sources using an annotation processor to Maven. I\'ve tried configuring the maven-compiler-plugin as follows:

    <         


        
相关标签:
7条回答
  • 2021-02-09 20:41

    I had this issue with GWTP Source Generate APT Processing annotations

    It was because I didn't set a version for the compiler plugin, my final setup:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.0</version>
        <configuration>
            <source>1.6</source>
            <target>1.6</target>
            <!-- <compilerArgument>-proc:none</compilerArgument> -->
            <generatedSourcesDirectory>${generated.sources}</generatedSourcesDirectory>
            <annotationProcessors>
                <annotationProcessor>com.gwtplatform.dispatch.annotation.processor.GenEventProcessor</annotationProcessor>
                <annotationProcessor>com.gwtplatform.dispatch.annotation.processor.GenDtoProcessor</annotationProcessor>
                <annotationProcessor>com.gwtplatform.dispatch.annotation.processor.GenDispatchProcessor</annotationProcessor>
            </annotationProcessors>
        </configuration>
    </plugin>
    
    0 讨论(0)
提交回复
热议问题