|
| 1 | +# Java Embedded Compiler |
| 2 | + |
| 3 | +> A library for compiling Java source code at runtime with pluggable compiler backends (JDK javac and Eclipse ECJ), supporting both in-memory and file-based output in standard Java and OSGi environments. |
| 4 | + |
| 5 | +Key facts: |
| 6 | +- Java 11 (source and target compatibility) |
| 7 | +- Maven 3.9.4 multi-module build, 6 modules |
| 8 | +- OSGi bundles with Declarative Services (Felix maven-bundle-plugin) |
| 9 | +- Pluggable compiler backends: JDK system compiler (javac) and Eclipse ECJ |
| 10 | +- In-memory and file-based compilation with flexible classloading |
| 11 | +- ServiceLoader discovery in standard Java, OSGi DS in containers |
| 12 | +- Apache License 2.0 |
| 13 | + |
| 14 | +## Docs |
| 15 | + |
| 16 | +- [README.md](README.md): Project overview with architecture diagrams and quick start guide |
| 17 | +- [AGENTS.md](AGENTS.md): Developer guide with build commands, module details, and coding conventions |
| 18 | +- [CONTRIBUTING.md](CONTRIBUTING.md): Development setup and submission guidelines |
| 19 | +- [.github/CIFLOW.md](.github/CIFLOW.md): CI/CD pipeline and GitFlow branching details |
| 20 | + |
| 21 | +## Modules — Core API |
| 22 | + |
| 23 | +- [java-embedded-compiler/pom.xml](java-embedded-compiler/pom.xml): Core API with CompilerContext (builder), CompilerFactory (strategy interface), CompilerUtil (static compilation entry point), file managers, classloaders, and file objects |
| 24 | + |
| 25 | +## Modules — Compiler Implementations |
| 26 | + |
| 27 | +- [java-embedded-compiler-jdt/pom.xml](java-embedded-compiler-jdt/pom.xml): JdtCompilerFactory — wraps the JDK system compiler (ToolProvider.getSystemJavaCompiler()), requires a full JDK at runtime |
| 28 | +- [java-embedded-compiler-ecj/pom.xml](java-embedded-compiler-ecj/pom.xml): EclipseCompilerFactory — wraps the Eclipse ECJ compiler with two-pass compilation (module-info first, then sources), works with just a JRE |
| 29 | + |
| 30 | +## Modules — Runtime & Integration |
| 31 | + |
| 32 | +- [java-embedded-compiler-osgi/pom.xml](java-embedded-compiler-osgi/pom.xml): CompilerService OSGi DS component that dynamically discovers and ranks CompilerFactory services |
| 33 | +- [java-embedded-compiler-itest/pom.xml](java-embedded-compiler-itest/pom.xml): Karaf 4.4.7 + Pax Exam integration tests covering all compilation modes for both compiler backends |
| 34 | +- [java-embedded-compiler-reports/pom.xml](java-embedded-compiler-reports/pom.xml): JaCoCo aggregate coverage report across all modules |
| 35 | + |
| 36 | +## Optional |
| 37 | + |
| 38 | +- [.github/workflows/build.yml](.github/workflows/build.yml): GitHub Actions CI/CD pipeline (build, test, deploy, tag, release) |
| 39 | +- [LICENSE.txt](LICENSE.txt): Apache License 2.0 |
0 commit comments