默认配置查看

在对应文件中创建了一个文件,文件为空时,执行命令 :mvn help:effective-pom ,会出现以下错误。


C:\temp\demo\project>mvn help:effective-pom[INFO] Scanning for projects...[ERROR] [ERROR] Some problems were encountered while processing the POMs:[FATAL] Non-readable POM C:\temp\demo\project\pom.xml: input contained no data @@[ERROR] The build could not read 1 project -> [Help 1][ERROR][ERROR]  The project  (C:\temp\demo\project\pom.xml) has 1 error[ERROR]    Non-readable POM C:\temp\demo\project\pom.xml: input contained no data[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/ProjectBuildingException 

在文件中写入默认内容:

4.0.0 com.companyname.project-group project 1.0

后,输出正常。

C:\temp\demo\project>mvn help:effective-pom [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.pom (0 B at 0 B/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/release/maven-release/2.5.3/maven-release-2.5.3.pom Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/release/maven-release/2.5.3/maven-release-2.5.3.pom (0 B at 0 B/s) Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.jar Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.5.3/maven-release-plugin-2.5.3.jar (0 B at 0 B/s) [INFO] [INFO] ---------------< com.companyname.project-group:project >---------------- [INFO] Building project 1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-help-plugin:2.2:effective-pom (default-cli) @ project --- [INFO] Effective POMs, after inheritance, interpolation, and profiles are applied: 4.0.0 com.companyname.project-group project 1.0 false central Central Repository https://repo.maven.apache.org/maven2 never false central Central Repository https://repo.maven.apache.org/maven2 C:\temp\demo\project\src\main\java C:\temp\demo\project\src\main\scripts C:\temp\demo\project\src\test\java C:\temp\demo\project\target\classes C:\temp\demo\project\target\test-classes C:\temp\demo\project\src\main\resources C:\temp\demo\project\src\test\resources C:\temp\demo\project\target project-1.0 maven-antrun-plugin 1.3 maven-assembly-plugin 2.2-beta-5 maven-dependency-plugin 2.8 maven-release-plugin 2.5.3 maven-clean-plugin 2.5 default-clean clean clean maven-resources-plugin 2.6 default-testResources process-test-resources testResources default-resources process-resources resources maven-jar-plugin 2.4 default-jar package jar maven-compiler-plugin 3.1 default-compile compile compile default-testCompile test-compile testCompile maven-surefire-plugin 2.12.4 default-test test test maven-install-plugin 2.4 default-install install install maven-deploy-plugin 2.7 default-deploy deploy deploy maven-site-plugin 3.3 default-site site site C:\temp\demo\project\target\site org.apache.maven.plugins maven-project-info-reports-plugin default-deploy site-deploy deploy C:\temp\demo\project\target\site org.apache.maven.plugins maven-project-info-reports-plugin C:\temp\demo\project\target\site org.apache.maven.plugins maven-project-info-reports-plugin C:\temp\demo\project\target\site [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.028 s [INFO] Finished at: 2019-11-05T14:46:45+08:00 [INFO] ------------------------------------------------------------------------

你可能感兴趣的:(默认配置查看)