今天不知怎么了突然就报错了,错误信息如下
E:\WEAVER\JDK\bin\java.exe -Dmaven.multiModuleProjectDirectory=E:\learningspring\07-springboot-session "-Dmaven.home=E:\idea\idea2019.1\IntelliJ IDEA 2019.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=E:\idea\idea2019.1\IntelliJ IDEA 2019.1\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:E:\idea\idea2019.1\IntelliJ IDEA 2019.1\lib\idea_rt.jar=60056:E:\idea\idea2019.1\IntelliJ IDEA 2019.1\bin" -Dfile.encoding=UTF-8 -classpath "E:\idea\idea2019.1\IntelliJ IDEA 2019.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version2019.1 package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building 07-springboot-session 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ 07-springboot-session ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.526 s
[INFO] Finished at: 2021-01-10T17:44:35+08:00
[INFO] Final Memory: 18M/462M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project 07-springboot-session: Input length = 1 -> [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/MojoExecutionException
Process finished with exit code 1
先上解决办法如下,在pom.xml文件中的插件中加上这个插件
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
接下来强行解释一下吧
我看了我的pom.xml文件中并没有maven-resources-plugin这个插件,就觉得很奇怪,我没有用却报错了,可能是父配置文件中有这玩意儿,所以在这里写上maven-resources-plugin的版本就好了,这里的版本会覆盖父配置文件的版本,简单的说就是把版本降低就好了,至于为什么要降低版本就有待研究了