Setup Java 6 annotation processing configuration for eclipse compiler with maven

前端 未结 3 400
囚心锁ツ
囚心锁ツ 2021-01-31 05:59

What\'s the best way to setup the eclipse project compiler configuration for Java 6 annotation processors?

My solution is to setup the org.eclipse.jdt.apt.core.pre

3条回答
  •  遥遥无期
    2021-01-31 06:07

    Update: You could try using the apt-maven-plugin. It currently provides three goals:

    • apt-process Executes apt on project sources.
    • apt:test-process Executes apt on project test sources.
    • apt:eclipse Generates Eclipse files for apt integration.

    You can configure the goals to run as part of your build as follows:

    
      ...
      
        ...
        
          org.codehaus.mojo
          apt-maven-plugin
          1.0-alpha-2
          
            
              
                process
                test-process
              
            
          
        
        ...
      
      ...
    
    

    By default the output directory is set to ${project.build.directory}/generated-sources/apt,

    There is an open Jira against the compiler plugin to add APT support for Java 6, you can go and vote for it if this is something you want to to see in future versions.

提交回复
热议问题