Skip to content

JavacCompiler uses the wrong heuristic for configuring annotation processing #59

@gilday

Description

@gilday

The JavacCompiler class will not configure annotation processing if the source version is < 1.6, regardless of the JDK version in use. The impact to JDK 1.6+ systems which are configured to source version 1.5 is that JavacCompiler will ignore the generated sources configurations and javac will process annotations using its default conventions.

In my environment, I am using Maven with JDK 1.8 and targeting Java 1.5 source. I would expect sources generated by annotation processors to be generated in the maven-compiler-plugin default generated sources directory (${project.build.directory}/generated-sources/annotations), but plexus-compiler never passes the -s flag to javac so the sources are instead generated in ${project.build.outputDirectory}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions