Skip to content

Repository files navigation

Plexus Compiler

Maven Central GitHub CI Reproducible Builds

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.

Modules

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#

Status

Maintained. maven-compiler-plugin depends on this, so public API is kept compatible.

Using it

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.

Error Prone

See the Error Prone installation guide, or the integration test in this repository for a working example.

Requirements

Java 8 or later.

Documentation

Contributing

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.

About

Plexus compiler a layer on top of compilers and used by maven-compiler-plugin

Topics

Resources

Contributing

Security policy

Stars

39 stars

Watchers

10 watching

Forks

Releases

Used by

Contributors

Languages