在使用mvn install:install-file -Dfile=D:\setup\fastdfs-client-java-1.27-RELEASE.jar -DgroupId=org.csource -DartifactId=fastdfs-client-java -Dversion=1.27-SNAPSHOT -Dpackaging=jar
When you install the package to a local jar, there has been
PS C:\Users\dell> mvn install:install-file -Dfile=D:\setup\fastdfs-client-java-1.27-RELEASE.jar -DgroupId=org.csource -DartifactId=fastdfs-client-java -Dversion=1.27-SNAPSHOT -Dpackaging=jar [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.075 s [INFO] Finished at: 2019-09-16T08:45:04+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\dell). 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
The error seems to be understood from the literal meaning pom file is not found, the project to build maven often encountered, but the installation package to a local warehouse jar first time, after everything Baidu to find a solution is to add parameters quotation marks, as follows:
mvn install:install-file "-Dfile=D:\setup\fastdfs-client-java-1.27-RELEASE.jar" "-DgroupId=org.csource"
"-DartifactId=fastdfs-client-java" "-Dversion=1.27-SNAPSHOT" "-Dpackaging=jar"
Original Reference: https://stackoverflow.com/questions/6704813/maven-generating-pom-file/11199865#11199865