apache - maven archetype 插件 - 在远程目录中找不到原型(prototype)。默认为内部目录

标签 apache maven archetypes

$ mvn -version
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T09:58:13+02:00)

从中央存储库获取依赖项效果非常好。
不过,我在获取原型(prototype)时遇到了问题。

例如,我正在尝试使用中央原型(prototype)目录中存在的原型(prototype):

mvn archetype:generate -DgroupId=com.example -DartifactId=sample-ear -DarchetypeArtifactId=wildfly-javaee7-webapp-ear-archetype -DarchetypeGroupId=org.wildfly.archetype -DinteractiveMode=false

Maven 失败。它基本上看不到远程目录中的任何原型(prototype):

[WARNING] No archetype found in remote catalog. Defaulting to internal catalog
[WARNING] Specified archetype not found.

我能够在浏览器中访问目录的 HTTP 链接。

文档 ( http://maven.apache.org/archetype/maven-archetype-plugin/specification/archetype-catalog.html ) 明确指出:

The Archetype Plugin knows by default about its internal catalog. It also knows about the local and remote catalogs.

remote represents the http://repo.maven.apache.org/maven2/archetype-catalog.xml catalog file.

您有遇到过这样的问题吗?
如果有任何可以指导我找到解决方案的提示,我将不胜感激。

最佳答案

添加选项-DarchetypeVersion=8.2.0.Final

关于apache - maven archetype 插件 - 在远程目录中找不到原型(prototype)。默认为内部目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48284515/

相关文章:

java - 在 SuperDevMode 中运行

plone - 防止用户将 BMP、TIFF 等图像上传到 Plone 中的 ImageField

php - 如何在 MAMP PRO v3.4 中更新 MySQL 版本

apache - 是否可以在 ProxyPass 中使用 "%{HTTP_HOST}"?

apache - .htaccess 中的多个 mod_rewrite 规则

java - Artifactory:自动生成原型(prototype)目录?

java - 是否可以在 Gradle 中创建原型(prototype)?

python - django wth gis.mysql 导致内部服务器错误

java.lang.NoSuchMethodError : org. apache.spark.sql.DataFrameReader.parquet

java - JBoss JMS : ERROR: JBREM000200: Remote connection failed: javax. security.sasl.SaslException:身份验证失败:服务器出现