我正在尝试构建https://documentation.magnolia-cms.com/display/DOCS/Travel+Demo+-+for+developers
中解释的演示应用程序我遇到了依赖性问题。
Downloading: https://repo.maven.apache.org/maven2/info/magnolia/maven/plugins/magnolia-setproperty-maven-plugin/1.2.1/magnolia-setproperty-maven-plugin-1.2.1.pom
[WARNING] The POM for info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:jar:1.2.1 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/info/magnolia/maven/plugins/magnolia-setproperty-maven-plugin/1.2.1/magnolia-setproperty-maven-plugin-1.2.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Magnolia Travel Demo (parent pom) .................. FAILURE [ 2.141 s]
[INFO] Magnolia Travel Demo Module ........................ SKIPPED
[INFO] Magnolia Travel Tours Module ....................... SKIPPED
[INFO] Magnolia Demo Projects Reactor ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.366 s
[INFO] Finished at: 2016-03-28T13:02:23+13:00
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1 or one of its dependencies could not be resolved: Could not find artifact info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:jar:1.2.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
请注意Magnolia repo已经添加,并且已经从Magnolia存储库下载了工件,这不是因为没有添加Magnolia repo。出于某种原因,它没有尝试从Magnolia repo下载,可能mvn尝试从第一次下载然后尝试mvn公共回购由于Magnolia repo上的一些问题,有人可以帮助我找出错误吗? ?
但这个jar可以在Magnolia repo上找到,我已经下载了jar并手动安装,然后我收到了以下错误,
[ERROR] Failed to execute goal info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1:set-property (currentDate) on project magnolia-travel-demo-parent: Execution currentDate of goal info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1:set-property failed: A required class was missing while executing info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1:set-property: org/apache/commons/lang/StringUtils
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>info.magnolia.maven.plugins:magnolia-setproperty-maven-plugin:1.2.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/software-install/repo/info/magnolia/maven/plugins/magnolia-setproperty-maven-plugin/1.2.1/magnolia-setproperty-maven-plugin-1.2.1.jar
[ERROR] urls[1] = file:/C:/software-install/repo/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.commons.lang.StringUtils
[ERROR] -> [Help 1]
答案 0 :(得分:3)
不是你想听到它,但我怀疑它确实是一个回购问题。您已经为普通工件设置了存储库,但您缺少的是maven尝试下载的是插件。
查看Maven文档,了解如何在settings.xml中设置插件存储库,例如: here(略有不同,你想要发布而不是快照)。
此外,您可能需要查看Magnolia Maven setup guide
底部Mathias的备注 HTH,
扬