本文介绍了Magnolia Demo 项目 mvn build 由于无法获取 magnolia-setproperty-maven-plugin 而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建 https 中解释的演示应用程序://documentation.magnolia-cms.com/display/DOCS/Travel+Demo+-+for+developers

我遇到了以下依赖问题.

I am getting following dependency issue.

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 存储库已经添加并且工件已经从 Magnolia 存储库下载,这不是因为没有添加 Magnolia 存储库.出于某种原因,它没有尝试从 Magnolia 存储库下载,可能 mvn 尝试先从该存储库下载,然后由于 Magnolia 存储库上的某些问题尝试 mvn 公共存储库,有人可以帮我找出问题所在吗?

Please note Magnolia repo is already added and artifacts are already downloaded from the Magnolia repository, this is not due to Magnolia repo is not added. for some reason it's not trying to download from Magnolia repo, probably mvn tries to download from that first then trying mvn public repo due to some issue on Magnolia repo, Can some one help me to identify what's wrong ?

但是这个 jar 在 Magnolia repo 上可用,我已经下载了 jar 并手动安装,然后我收到以下错误,

But this jar is available on Magnolia repo and I have downloaded the jar and installed manually, then I am getting following error,

[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]

推荐答案

不是你想听,但我怀疑这确实是一个 repo 问题.您已经为普通工件设置了存储库,但是您缺少的是 maven 尝试下载的是插件.

Not that you want to hear it, but I suspect that it is indeed a repo problem. You have set repository for normal artifacts, but what you are missing is that what maven is trying to download is plugin.

查看 Maven 文档,了解如何在 settings.xml 中设置插件存储库,例如此处(略有不同,您希望发布和不是快照).

Look at Maven docu on how to setup plugin repo in your settings.xml, e.g. here (with the slight difference that you want releases and not snapshots).

此外,您可能想在 Magnolia Maven 底部查看 Mathias 的注释设置指南

HTH,

这篇关于Magnolia Demo 项目 mvn build 由于无法获取 magnolia-setproperty-maven-plugin 而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 18:32