gpt4 book ai didi

java - 无法创建新的 Maven hello-world 项目

转载 作者:IT老高 更新时间:2023-10-28 20:22:16 25 4
gpt4 key购买 nike

我正在看一些 maven 教程视频,然后在安装 maven 后遇到了这个命令:

mvn archetype:create -DgroupId=com.di.maven -DartifactId=hello-world

构建失败并抛出以下错误:

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.3:create 
(default-cli) on project standalone-pom: Unable to parse configuration of mojo
org.apache.maven.plugins:maven-archetype-plugin:2.3:create for parameter #: Abstract
class or interface 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be
instantiated -> [Help 1]

是什么原因,我该如何解决?我在 Ubuntu 中以用户身份运行。

最佳答案

create 更改为 generate

mvn archetype:generate -DgroupId=com.di.maven -DartifactId=hello-world -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

关于java - 无法创建新的 Maven hello-world 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29147329/

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