Vanilla Maven 3.3.9 找不到用于生成开花原型的 Magnolia 目录,并显示消息:“未定义目录.使用内部目录" [英] Vanilla Maven 3.3.9 does not find Magnolia catalog for blossom archetype generation with message: "No catalog defined. Using internal catalog"

查看:79
本文介绍了Vanilla Maven 3.3.9 找不到用于生成开花原型的 Magnolia 目录,并显示消息:“未定义目录.使用内部目录"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

5.5 版的 Magnolia CORE 文档需要 入门使用 Blossom 基于他们自己的 目录存储库 的 maven 原型生成>.我可以看到并输入该 archetype-catalog.xml,因为它应该是,而且一切似乎都在那里.

The Magnolia CORE Docs for Version 5.5 requires for Getting started with Blossom an maven archetype generation based on their own catalog repository. I can see and enter that archetype-catalog.xml as it should be andy everything seems right there.

但是,如果我尝试使用文档中的给定命令生成它

However if I try to generate it with the given command from the documentation

mvn archetype:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/

我没有得到 magnolia 国外 repo 的列表,而是从后备 maven-archetype repo 中得到的.

I don't get the list of the magnolia foreign repo, but from the fallback maven-archetype repo.

[INFO] Scanning for projects...
[INFO]
[INFO]     ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO]     ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.0:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.0:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:3.0.0:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
`enter code here`[INFO] No catalog defined. Using internal catalog
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: internal -> org.apache.maven.archetypes:maven-archetype-archetype (An     archetype which contains a sample archetype.)
2: internal -> org.apache.maven.archetypes:maven-archetype-j2ee-simple (An archetype which contains a simplifed sample J2EE application.)
3: internal -> org.apache.maven.archetypes:maven-archetype-plugin (An archetype which contains a sample Maven plugin.)
4: internal -> org.apache.maven.archetypes:maven-archetype-plugin-site (An archetype which contains a sample Maven plugin site.
  This archetype can be layered upon an existing Maven plugin project.)
5: internal -> org.apache.maven.archetypes:maven-archetype-portlet (An archetype which contains a sample JSR-268 Portlet.)
6: internal -> org.apache.maven.archetypes:maven-archetype-profiles ()
7: internal -> org.apache.maven.archetypes:maven-archetype-quickstart (An archetype which contains a sample Maven project.)
8: internal -> org.apache.maven.archetypes:maven-archetype-site (An archetype which contains a sample Maven site which demonstrates
  some of the supported document types like APT, XDoc, and FML and demonstrates how
  to i18n your site. This archetype can be layered upon an existing Maven project.)
9: internal -> org.apache.maven.archetypes:maven-archetype-site-simple (An archetype which contains a sample Maven site.)
10: internal -> org.apache.maven.archetypes:maven-archetype-webapp (An archetype which contains a sample Maven Webapp project.)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 7:

在教程中

1: https://nexus.magnolia-cms.com/content/groups/public/ -> info.magnolia.maven.archetypes:magnolia-theme-archetype
2: ...

应该提出来自 Magnolia 目录的原型,而不是 maven 的原型.

archetypes from the magnolia catalog should be proposed instead of the maven ones.

线

[INFO] No catalog defined. Using internal catalog

另外指向错误的目录定义.

additionally points to a wrong catalog definition.

我没有改变我的 maven,因为它是一个非常新的安装,并尝试了多种可能的解决方案来让它运行,因为我的一个同事原型生成有效,其他人则没有.即使我们删除了它的本地存储库,它之后仍然可以工作.降级到其 Maven 版本也没有带来任何解决方案.

I have not altered my maven as it's a pretty new installation and tried really multiple possible solutions to get it running as for one of my colleagues the archetype generation works, for all others it doesn't. Even if we removed its local repo it still worked afterwards. A downgrade to its maven version brought no solution as well.

关于如何运行它的任何想法?对你有用吗?

Any ideas on how to get this running? Does it work for you?

推荐答案

我建议暂时使用以下应该对您有用的方法.

I'd suggest to use the following for the time being which should do the trick for you.

mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/

原因是 Apache 发布了一个新版本(即 3.0.0)并破坏了此功能(ARCCHETYPE-519).

Reason being is that Apache released a new version (3.0.0 that is) and breaks this functionality (ARCHETYPE-519).

这篇关于Vanilla Maven 3.3.9 找不到用于生成开花原型的 Magnolia 目录,并显示消息:“未定义目录.使用内部目录"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆