maven骨架报错:but there is no POM in this directory

maven可以正常使用,但是用它的骨架创建项目就会报错,比如用web项目的骨架:
maven骨架报错:but there is no POM in this directory_第1张图片
maven骨架报错:but there is no POM in this directory_第2张图片
maven骨架报错:but there is no POM in this directory_第3张图片
完整报错如下:
E:\java_jdk\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Users\AppData\Local\Temp\archetype1tmp -Dmaven.home=E:\maven\apache-maven-3.6.1 -Dclassworlds.conf=E:\maven\apache-maven-3.6.1\bin\m2.conf “-Dmaven.ext.class.path=E:\IntellijIDEA\IntelliJ IDEA 2019.2.1\plugins\maven\lib\maven-event-listener.jar” -Dfile.encoding=UTF-8 -classpath E:\maven\apache-maven-3.6.1\boot\plexus-classworlds-2.6.0.jar org.codehaus.classworlds.Launcher -Didea.version2019.2.1 -s E:\maven\apache-maven-3.6.1\conf\settings.xml -DinteractiveMode=false -DgroupId=qw -DartifactId=as -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
[IJ]-1-Unknown-[IJ]-event=org.apache.maven.toolchain.building.DefaultToolchainsBuildingResult@e22bdd
[INFO] Scanning for projects…
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.084 s
[INFO] Finished at: 2020-02-18T14:52:31+08:00
[INFO] ------------------------------------------------------------------------
[IJ]-1-Unknown-[IJ]-event=org.apache.maven.execution.DefaultMavenExecutionResult@107730f
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\AppData\Local\Temp\archetype1tmp). 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

maven的版本信息如下:
maven骨架报错:but there is no POM in this directory_第4张图片
从报错信息看是说在某个目录下缺少pom文件,很郁闷,没道理啊,这个问题想了很久,重装过maven、降低过maven版本、查遍了百度都未能解决,所以先记录下来,希望有懂的大神看到了能告诉我

虽然骨架一般不使用,尤其是用了springboot后,不用它也没什么大碍,但是我毕竟面试中被问到过类似的问题,它是我一直没能解决的问题
虽然没什么影响但是还是希望能够解决它

你可能感兴趣的:(maven骨架报错:but there is no POM in this directory)