开始使用AEM项目。现在我尝试在本地启动项目并在构建期间遇到下一个错误(stacktrace cut):
[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.17.0:scr (generate-scr-scrdescriptor) on project canadian-tire-site-core: Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.17.0:scr failed: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.felix:maven-scr-plugin:1.17.0:scr (generate-scr-scrdescriptor) on project canadian-tire-site-core: Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.17.0:scr failed: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213) .....
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.17.0:scr failed: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:145) ....
Caused by: java.lang.IllegalArgumentException: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class
at javax.imageio.spi.ServiceRegistry.checkClassAllowed (ServiceRegistry.java:745) ....
配置文件:
<!-- Apache Felix SCR Plugin -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>1.17.0</version>
<executions>
<execution>
<id>generate-scr-scrdescriptor</id>
<goals>
<goal>scr</goal>
</goals>
<configuration>
<properties>
<service.vendor>CTC</service.vendor>
</properties>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.5.11</version>
</dependency>
</dependencies>
</plugin>
我还检查了Java和mvn版本,看起来一切都很好:
echo $JAVA_HOME
C:\Program Files\Java\jdk-9.0.4
mvn -v
Apache Maven 3.5.2
Maven home: C:\apache-maven-3.5.2-bin
Java version: 9.0.4, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-9.0.4
如果有人可以就我应该朝哪个方向提出建议,那会很棒。