Создание проекта Maven не удается - PullRequest
0 голосов
/ 05 ноября 2018

Я пытаюсь создать новый проект в пустой папке в Windows 10. Я уверен, что каталог пуст. Справка: Ошибка при создании нового проекта Maven

C:\Projects\Java\>mvn -version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T02:41:47+08:00)
Maven home: C:\Program Files\apache-maven-3.6.0\bin\..
Java version: 11.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"


C:\Projects\Java>mvn -B archetype:generate -DarchetypeGroupdId=org.apache.maven.archetypes -DgroupdId=com.mycompany.app -DartifactId=HelloWorld -DarchetypeArtifactId=maven-archetype-quickstart
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO]
[INFO]
[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[WARNING] Property groupId is missing. Add -DgroupId=someValue
[WARNING] Property package is missing. Add -Dpackage=someValue
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.625 s
[INFO] Finished at: 2018-11-05T10:43:49+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: Archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.0 is not configured
[ERROR]         Property groupId is missing.
[ERROR]         Property package is missing.
[ERROR] -> [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

1 Ответ

0 голосов
/ 05 ноября 2018

Fixed. Это произошло из-за опечатки: "-DgroupId".

...