I see this error moving from java 8 to 11 in AEM 6.5. Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.20.0:scr failed: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class?
Solved! Go to Solution.
Views
Replies
Total Likes
The Felix SCR plugin only supports the proprietary Felix SCR annotations, but not the recommended OSGI annotations. That's the reason why this plugin is abandoned and does not receive further updates. Potentially its latest version supports Java 11, but you should switch to OSGI annotations.
(The old annotations are still supported on AEM 6.5 and IIRC still on AEM CS, but it's definitely a dead end.)
Jörg
Hi @shajiahmed
By moving to Java 11, the class files that you create will be compiled to Java 11 byte code. The maven-scr-plugin then has to scan this byte code to find the annotations that are applied to it.
Your current version of maven-scr-plugin (1.20.0) does not support on Java 11 and you will need to find the maven-scr-plugin that supports Java 11.
The latest maven-scr-plugin as of today is 1.26.4 and it could be possible that this latest version of the plugin has support for Java 11.
https://mvnrepository.com/artifact/org.apache.felix/maven-scr-plugin/1.26.4
The other option will be to start using the maven-bundle-plugin and the standard Declarative Services annotations instead of the Custom Felix annotations. Note that this would still involve updating those plugins to versions which can support Java 11. I personally using maven-bundle-plugin version 4.2.0 with Java 11 and it works perfectly fine.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.0</version>
</plugin>
Note: This would still involve updating some of the plugins to versions which can support Java 11.
Hope this helps!
Thanks
Hi , I am trying to build AEM modernization tool code base and facing similar issue. I tried the steps you suggested but this error " Failed to execute goal org.apache.felix:maven-scr-plugin:1.26.4:scr (generate-scr-scrdescriptor) on project aem-modernize-tools: SCR Descriptor parsing had failures (see log)" .
Any leads or pointers will be very helpful
Views
Replies
Total Likes
The Felix SCR plugin only supports the proprietary Felix SCR annotations, but not the recommended OSGI annotations. That's the reason why this plugin is abandoned and does not receive further updates. Potentially its latest version supports Java 11, but you should switch to OSGI annotations.
(The old annotations are still supported on AEM 6.5 and IIRC still on AEM CS, but it's definitely a dead end.)
Jörg
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
<artifactId>maven-scr-plugin</artifactId>
<version>1.26.4</version>
In the Pom.xml file, I changed 1.20.0 to 1.26.4, which solved the problem.
Views
Replies
Total Likes
Not working
Views
Replies
Total Likes