One API over several Java compilers, so a build tool can switch between them without knowing how each is
invoked. This is what maven-compiler-plugin uses: its <compilerId> selects one of the implementations
below.
| Artifact | What it is |
|---|---|
plexus-compiler-api |
The Compiler interface and its configuration. Depend on this to write against the API |
plexus-compiler-manager |
Looks up an implementation by id |
plexus-compiler-javac |
The JDK compiler — the default |
plexus-compiler-eclipse |
The Eclipse batch compiler (ECJ) |
plexus-compiler-javac-errorprone |
javac with Error Prone |
plexus-compiler-aspectj |
AspectJ |
plexus-compiler-csharp |
C# |
Maintained. maven-compiler-plugin depends on this, so public API is kept compatible.
To write against the API:
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-api</artifactId>
<version>2.16.2</version>
</dependency>Check the badge above for the current version.
To use a non-default compiler in a build, you normally do not depend on these directly — you set
<compilerId> on maven-compiler-plugin and add the matching implementation to that plugin's
dependencies. See the
Maven documentation.
See the Error Prone installation guide, or the integration test in this repository for a working example.
Java 8 or later.
See CONTRIBUTING.md. In short:
mvn verify builds, and run mvn spotless:apply before pushing or CI will fail on formatting.
Please report security vulnerabilities privately — see SECURITY.md, not a public issue.