apache / apache/maven-compiler-plugin

<proc>only</proc> does not work as expected

Open
#1,006 1 comment 0 reactions 0 assignees View on GitHub
3.x bug
Dominant language
Java
Stars
261
Forks
191
Avg merge
1d 5h
Merged PRs (30d)
8

Description

### Affected version

3.14.1

### Bug description

I attempted to create a separate Maven execution for the Log4j annotation processor as described in the [Log4j plugin documentation](https://logging.apache.org/log4j/2.12.x/manual/plugins.html).

When the second execution is bound to the `process-classes` phase, the plugin outputs
`Nothing to compile - all classes are up to date.` and the annotation processor does not run.

If I move the execution to the `generate-sources` phase, the processor runs correctly and generates the expected output. However, the log message says `Compiling n source files with javac` which is misleading because no source files are actually compiled—only the annotation processor is executed.

It appears that the maven-compiler-plugin does not handle the setting beyond passing it to javac. This makes it difficult to run annotation processors in isolation without triggering confusing or incorrect log messages.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.