【问题标题】:getting error while executing mvn clean install command执行 mvn clean install 命令时出错
【发布时间】:2019-12-03 06:39:57
【问题描述】:
[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.7.4:scr (generate-scr-descriptor) on project slingjcr-bundle: Execution generate-scr-descriptor of goal org.apache.felix:maven-scr-plugin:1.7.4:scr failed: org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider is not an ImageIO SPI class -> [Help 1]`enter code here`
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :slingjcr-bundle

您好,我正在处理 AEM 项目,因此在执行 mvn clean install 时出现上述错误。我正在使用 java 11 和 maven 3.6.2,运行 AEM 6.5

【问题讨论】:

  • 您是否尝试过使用 -e 开关再次运行该命令?
  • 运行 -e 开关后出现以下错误:原因:org.apache.maven.plugin.PluginExecutionException: Execution generate-scr-descriptor of goal org.apache.felix:maven-scr-plugin :1.7.4:scr failed: org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider 不是 ImageIO SPI 类 原因:java.lang.IllegalArgumentException: org.apache.felix.scrplugin.tags.annotation.AnnotationTagProvider 是不是 ImageIO SPI 类
  • 我的 AEM 版本是 6.5,运行的是 6.5 支持的 java 11 (jdk 11.0.4)
  • 您是否正在从较旧的 AEM 6.x 迁移到 AEM 6.5?

标签: java maven aem


【解决方案1】:

首先,您使用的是 AEM 6.5,如果这是一个新项目,请使用 OSGI R6 或 R7 而不是 Felix SCR 注释。请参阅:[1][2]

如果这是一个现有项目,并且您真的只希望 SCR 注释工作,那么您需要使用最新版本的 maven-scr-plugin。

此特定问题已在 1.22.0the maven-scr-plugin 版本中修复,根据:https://issues.apache.org/jira/browse/FELIX-5118?attachmentOrder=asc

您正在使用该插件的 1.7.4 版本。这个答案的最新是1.26.2

见:https://mvnrepository.com/artifact/org.apache.felix/maven-scr-plugin

【讨论】:

    【解决方案2】:

    如果您使用 Java JDK 1.8,则不会出现此问题。如果您使用更高版本,可能会遇到类似的错误,因为包和类在版本之间发生了变化。

    【讨论】:

      猜你喜欢
      • 2020-03-23
      • 1970-01-01
      • 1970-01-01
      • 2014-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多