gpt4 book ai didi

maven - 调用 mvn 原型(prototype) :create-from-project on a simple archetype:webapp project is asking for Setting. xml

转载 作者:行者123 更新时间:2023-12-02 16:48:38 27 4
gpt4 key购买 nike

我正在关注 this instruction了解maven原型(prototype)。打电话mvn archetype:create-from-project在一个简单的 webapp 项目上要求我有 setting.xml .m2 下的文件目录。

不确定为什么要问,无法找到这背后的任何具体原因。也没有为任何本地项目创建任何文档状态。

如果能给个清晰的图片请帮忙看看。附加运行命令时的错误。

[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.example:myapp >--------------------------
[INFO] Building myapp Maven Webapp 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.1.2:create-from-project (default-cli) > generate-sources @ myapp >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.1.2:create-from-project (default-cli) < generate-sources @ myapp <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.1.2:create-from-project (default-cli) @ myapp ---
[INFO] Setting default groupId: com.example
[INFO] Setting default artifactId: myapp
[INFO] Setting default version: 0.0.1-SNAPSHOT
[INFO] Setting default package: com.example
[WARN] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[ERROR] Error executing Maven.
[ERROR] The specified user settings file does not exist: C:\Users\Rajat Dobriyal\.m2\settings.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.303 s
[INFO] Finished at: 2020-01-06T00:38:43+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:create-from-project (default-cli) on project myapp: Invoker process ended with result different than 0! -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

任何帮助都会很棒。

最佳答案

settings.xml 不会在安装过程中创建,这就是为什么您需要在 C:\Users\Rajat Dobriyal\.m2\settings.xml 下创建默认设置文件的原因> 内容:

    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
</settings>

更详细的是here

关于maven - 调用 mvn 原型(prototype) :create-from-project on a simple archetype:webapp project is asking for Setting. xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59603307/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com