apache / apache/maven-compiler-plugin

[MCOMPILER-581] Create second default execution "default-generate-sources" for APT

Open
#857 1 comment 0 reactions 0 assignees View on GitHub
maintenance priority:major
Dominant language
Java
Stars
261
Forks
191
Avg merge
1d 5h
Merged PRs (30d)
8

Description

**[Benjamin Marwell](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mampf86)** opened **[MCOMPILER-581](https://issues.apache.org/jira/browse/MCOMPILER-581?redirect=false)** and commented

Starting with version 4.0.0 of this plugin for use with Maven 4+, the following changes should be incorporated to align the compilation process with the process designed by the OpenJDK javac team:

* Modify default-compile to use proc:none by default
* Create a new goal default-generate-sources and use proc:only

This will align the compilation process with the default javac use.

## Rationale

Before JDK 21+, no "proc:full" was available and implicitly used when no proc:* was set.
However, starting with JDK 21, proc:full was introduced and not specifying proc:* will now trigger a warning.

## Alternatives

Keep one phase but specify proc:full whenever APTs are in the CP or used as a compiler-plugin dependency/path or when APT classes are explicitly given.

## Drawbacks of this approach

TODO: document drawbacks of this approach and of the alternatives.

---
No further details from [MCOMPILER-581](https://issues.apache.org/jira/browse/MCOMPILER-581?redirect=false)

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.