【问题标题】:Vanilla Maven 3.3.9 does not find Magnolia catalog for blossom archetype generation with message: "No catalog defined. Using internal catalog"Vanilla Maven 3.3.9 找不到用于生成开花原型的 Magnolia 目录,并显示消息:“未定义目录。使用内部目录”
【发布时间】:2017-07-02 19:04:51
【问题描述】:

5.5 版的 Magnolia CORE Docs 需要 Getting started with Blossom 一个基于他们自己的 catalog repository 的 maven 原型生成。我可以看到并输入该archetype-catalog.xml,因为它应该是并且一切似乎都在那里。

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

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

我没有得到 magnolia 国外 repo 的列表,而是来自后备的 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 原型。

线

[INFO] No catalog defined. Using internal catalog

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

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

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

【问题讨论】:

    标签: maven magnolia maven-archetype


    【解决方案1】:

    我建议暂时使用以下内容,这应该可以为您解决问题。

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

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

    【讨论】:

    • 非常感谢!似乎我一直在寻找这个问题,但在那个方向。
    • @Ducaz035 jira 票,用于同时更新原型/目录和文档中的注释? ;)
    • @jan 确实有道理:)
    猜你喜欢
    • 1970-01-01
    • 2014-10-25
    • 1970-01-01
    • 2021-02-22
    • 1970-01-01
    • 1970-01-01
    • 2021-12-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多