整理了下windows,dos下运行的命令出现的failure和success,按顺序梳理,错误逻辑不懂,放着备用
1
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0>
mvn archetype:generate -DgroupId=com.netease -DartifactId=restaurant -Dpackage=com.netease -Dversion=1.0.0-SNAPSHOT DarchetypeArtifactId=maven-archetype-webapp
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0). Please verify you invoked Maven from the correct directory. -> [Help 1]
2
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\restaurant> /*mkdir新建的restaurant文件夹*/
mvn archetype:generate -DgroupId=com.netease -DartifactId=restaurant -Dpackage=com.netease -Dversion=1.0.0-SNAPSHOT DarchetypeArtifactId=maven-archetype-webapp
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
3
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\restaurant>
mvn install
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
4
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant> /*mkdir新建的maven-restaurant文件夹*/
mvn archetype:generate -DgroupId=com.netease -DartifactId=restaurant -Dpackage=com.netease -Dversion=1.0.0-SNAPSHOT DarchetypeArtifactId=maven-archetype-webapp
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
5
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn install
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
6
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn tomcat7:run
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 kB at 3.8 kB/s)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 3.9 kB/s)
[ERROR] No plugin found for prefix 'tomcat7' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\yf\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
7
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn tomcat:run
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:run (default-cli): Goal requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
8
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn help:tomcat7
[ERROR] Could not find goal 'tomcat7' in plugin org.apache.maven.plugins:maven-help-plugin:2.2 among available goals expressions, active-profiles, effective-settings, system, effective-pom, help, all-profiles, describe, evaluate -> [Help 1]
9
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn help:tomcat
[ERROR] Could not find goal 'tomcat' in plugin org.apache.maven.plugins:maven-help-plugin:2.2 among available goals expressions, active-profiles, effective-settings, system, effective-pom, help, all-profiles, describe, evaluate -> [Help 1]
10
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn install
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
11
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn package
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
12
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn test
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant). Please verify you invoked Maven from the correct directory. -> [Help 1]
13
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0> /*该文件夹为安装目录,无pom*/
mvn install
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0). Please verify you invoked Maven from the correct directory. -> [Help 1]
14
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0>
mvn archetype:generate -DgroupId=com.netease -DartifactId=restaurant -Dpackage=com.netease -Dversion=1.0.0-SNAPSHOT DarchetypeArtifactId=maven-archetype-webapp
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0). Please verify you invoked Maven from the correct directory. -> [Help 1]
15
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi> /*原有的文件夹,里面有pom文件以及两个依赖项目Restaurant和Kitchen*/
mvn archetype:generate -DgroupId=com.netease -DartifactId=restaurant -Dpackage=com.netease -Dversion=1.0.0-SNAPSHOT DarchetypeArtifactId=maven-archetype-webapp
..
.
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi>
mvn archetype:generate -DarchetypeCatalog=internal
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project restaurant-parent: Directory restaurant already exists - please run from a clean directory -> [Help 1]
16
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi\Restaurant>
mvn archetype:generate -DarchetypeCatalog=internal
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project Restaurant: Directory restaurant already exists - please run from a clean directory -> [Help 1]
17
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi\Restaurant>
mvn archetype:generate -DarchetypeCatalog=internal
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project Restaurant: Directory Restaurant already exists - please run from a clean directory -> [Help 1]
18
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi\Restaurant>
mvn clean
[INFO] BUILD SUCCESS
19
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi\Restaurant>
mvn archetype:generate -DarchetypeCatalog=internal
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project Restaurant: Directory Restaurant already exists - please run from a clean directory -> [Help 1]
20
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi\Restaurant\Restaurant>
mvn archetype:generate -DarchetypeCatalog=internal
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project Restaurant: Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
21
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\Restaurant-Maven-Multi\Restaurant\restaurant2> /*mkdir新建的restaurant2文件夹*/
mvn archetype:generate -DarchetypeCatalog=internal
[INFO] BUILD SUCCESS
22
D:\JDK\Maven\apache-maven-3.5.0-bin\apache-maven-3.5.0\maven-restaurant>
mvn archetype:generate -DarchetypeCatalog=internal
[INFO] BUILD SUCCESS