错误 运行 mvn:generate 生成新项目

Error running mvn:generate to generate NEW project

给定原型 cmd -

mvn archetype:generate -DarchetypeGroupId=io.confluent.maven.archetypes -DarchetypeArtifactId=kafka-connect-quickstart \
    -DarchetypeVersion=0.10.0.0

当我 运行 在一个新的空目录中时,它应该为我创建一个源代码文件夹结构。

相反,我得到以下 -

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.113 s
[INFO] Finished at: 2019-04-05T14:37:19+13:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\Dev\sandpit\connect-quickstart). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException

在我看来,它正在寻找一个 pom 文件,但我没有,因为这是一个新项目。

有线索吗?有什么帮助吗?

环境:Windows。 java -v == OpenJDK 版本“11.0.2”

命令

mvn archetype:generate -DarchetypeGroupId=io.confluent.maven.archetypes -DarchetypeArtifactId=kafka-connect-quickstart -DarchetypeVersion=0.10.0.0

在我的电脑上运行一切正常。但是,如果我包含反斜杠(出现在您的问题中),我会收到与您显示的错误一样的错误。

 mvn archetype:generate -DarchetypeGroupId=io.confluent.maven -DarchetypeArtifactId=kafka-connect-quickstart -DarchetypeVersion=0.10.0.0

您需要从 io.confluent.maven.archetypes 中删除原型,因为没有任何类似的 groupId。在我的电脑上工作

你可以参考这里
https://mvnrepository.com/artifact/io.confluent.maven/kafka-connect-quickstart/0.10.0.0