From a2b578ae67b1cf8e3a836d8254db6684e28dc716 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 30 Jan 2024 16:41:59 +0100 Subject: [PATCH] Disable annotation processor by default (#105) clarify in Readme how to generate named index This closes #104 --- README.md | 7 +++++++ .../services/javax.annotation.processing.Processor | 1 - org.eclipse.sisu.inject/plugin.xml | 9 --------- 3 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 org.eclipse.sisu.inject/META-INF/services/javax.annotation.processing.Processor delete mode 100644 org.eclipse.sisu.inject/plugin.xml diff --git a/README.md b/README.md index 065109bd..06c7ebdf 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,13 @@ Sisu uses [Google-Guice](https://github.com/google/guice) to perform dependency [Javadoc](https://eclipse.github.io/sisu.inject/apidocs/) +### Generation of Named Index + +Often Sisu's `SpaceModule` doesn't scan the full classpath at run time (for relevant annotations) but relies on a pre-generated index at `META-INF/sisu/javax.inject.Named`. There are two different ways how to create such an index file: + +1. By leveraging the Java annotation processor in [org.eclipse.sisu.space.SisuIndexAPT6](https://github.com/eclipse/sisu.inject/blob/master/org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/space/SisuIndexAPT6.java) to generate the index. One needs to enable via [`javac -processor org.eclipse.sisu.space.SisuIndexAPT6`](https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#annotation-processing) or with the according [`maven-compiler-plugin` parameter `annotationProcessors`](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessors). +2. By leveraging the dedicated Maven plugin + ## Related projects https://github.com/eclipse/sisu.mojos/ diff --git a/org.eclipse.sisu.inject/META-INF/services/javax.annotation.processing.Processor b/org.eclipse.sisu.inject/META-INF/services/javax.annotation.processing.Processor deleted file mode 100644 index 3e7fe8c3..00000000 --- a/org.eclipse.sisu.inject/META-INF/services/javax.annotation.processing.Processor +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.sisu.space.SisuIndexAPT6 diff --git a/org.eclipse.sisu.inject/plugin.xml b/org.eclipse.sisu.inject/plugin.xml deleted file mode 100644 index de9e4702..00000000 --- a/org.eclipse.sisu.inject/plugin.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -