FELIX-3550 : Reimplement the SCR Generator
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1349780 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/annotations/src/main/resources/META-INF/services/org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider b/scrplugin/annotations/src/main/resources/META-INF/services/org.apache.felix.scrplugin.AnnotationProcessor
similarity index 100%
rename from scrplugin/annotations/src/main/resources/META-INF/services/org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider
rename to scrplugin/annotations/src/main/resources/META-INF/services/org.apache.felix.scrplugin.AnnotationProcessor
diff --git a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/AnnotationProcessorManager.java b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/AnnotationProcessorManager.java
index 913d290..2e1c74e 100644
--- a/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/AnnotationProcessorManager.java
+++ b/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/helper/AnnotationProcessorManager.java
@@ -72,16 +72,9 @@
// add custom processors defined in the tool (maven, ant...)
for ( int i = 0; i < annotationProcessorClasses.length; i++ ) {
- loadProcessor( classLoader, annotationProcessorClasses[i], false );
+ loadProcessor( classLoader, annotationProcessorClasses[i] );
}
- // always add processors supporting built-in SCR default properties (for compatibility with older
- // annotation versions)
- loadProcessor( classLoader,
- "org.apache.felix.scrplugin.SCRAnnotationProcessor", true );
- loadProcessor( classLoader,
- "org.apache.felix.scrplugin.SlingAnnotationProcessor", true );
-
// create ordered list
for(final AnnotationProcessor pro : this.processors.values() ) {
this.cachedProcessors.add(pro);
@@ -123,7 +116,7 @@
}
}
- private void loadProcessor( final ClassLoader classLoader, final String className, final boolean silent )
+ private void loadProcessor( final ClassLoader classLoader, final String className )
throws SCRDescriptorFailureException {
String failureMessage = null;
try {
@@ -142,8 +135,8 @@
failureMessage = "Annotation provider class '" + className + "' not found.";
}
- // throw an optional exception if not required to remaing silent
- if ( failureMessage != null && !silent ) {
+ // throw an exception
+ if ( failureMessage != null ) {
throw new SCRDescriptorFailureException( failureMessage );
}
}