【问题标题】:Error "Failed to execute goal" while trying to create a project with JSF尝试使用 JSF 创建项目时出现错误“无法执行目标”
【发布时间】:2015-07-01 14:02:37
【问题描述】:

我未能执行目标org.apache.maven-dependency-plugin:2.8:tree

我在我的 cmd 中使用命令:

mvn archetype:create-DgroupId=com.tutorialspoint.test -DartifactId=helloworld -DarchetypeArtifactId=maven-archetype-webapp

我遵循了许多解决方案,但没有找到任何解决方案。

【问题讨论】:

  • 我强烈怀疑日志中有更多详细信息 - 或者您可以增加详细程度以确保日志中有 更多详细信息...
  • 是的,我试过了,没用。但是你能详细说明如何使用。所以如果我犯了任何错误,我可以恢复。
  • 我认为create-DgroupId=com.tutorialspoint.test之间应该有一个空格。
  • 你可以试试这个 - mvn archetype:generate "-DarchetypeGroupId=org.apache.maven.archetypes" "-DgroupId=com.tutorialspoint.test" "-DartifactId=helloworld" 吗?
  • @LittlePanda 是对的。您是否尝试在“创建”后使用空格运行“mvn archetype:create -DgroupId=com.tutorialspoint.test -”?如果你这样做了,显示输出。

标签: java eclipse jsp maven maven-plugin


【解决方案1】:

Maven 找不到目标create-DgroupId=com.tutorialspoint.test

尝试在create

之后放置空格
mvn archetype:create -DgroupId=com.tutorialspoint.test -DartifactId=helloworld -DarchetypeArtifactId=maven-archetype-webapp

【讨论】:

  • Maven 说在截图中没有找到目标 create-DgroupId=com.tutorialspoint.test。如果您在“创建”之后添加空间,我认为输出会不一样。
【解决方案2】:

该问题的解决方案是使用以下带引号的命令:

mvn archetype:generate "-DarchetypeGroupId=org.apache.maven.archetypes" "-DgroupId=com.tutorialspoint.test" "-DartifactId=helloworld"

【讨论】:

  • 我认为这两个命令都可以工作(带或不带引号)。我将此作为答案发布,因为这适用于 OP。
猜你喜欢
  • 1970-01-01
  • 2020-06-16
  • 2021-02-13
  • 2021-11-18
  • 1970-01-01
  • 2020-12-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多