雷哥获得的启发:
Maven插件配置,本质还是jar包。
3.1.0版本下载失败,改成3.1.1就行了。
不用纠结哪个版本。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}</finalName>
<recompressZippedFiles>false</recompressZippedFiles>
<appendAssemblyId>true</appendAssemblyId>
<descriptors>
<descriptor>package.xml</descriptor>
</descriptors>
<!-- 打包结果输出的基础目录 -->
<outputDirectory>${project.build.directory}/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>D:\MavenRepos\org\apache\maven\plugins\maven-assembly-plugin\3.1.1
----------------------------------
解决方式一:
1、查看.m2\repository\org\apache\maven\plugins\maven-resources-plugin\下maven-resources-plugin-2.6.jar文件是否存在,用rar打开是否正常的,如果都正常,则说明jar包没有问题
2、重新执行一遍maven install 即可
解决方式二:
在用Eclipse IDE for Java EE Developers进行maven项目的开发时,报错Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of;解决方法:
1、查看windows -> Preferences -> maven 的settings.xml文件中.m2的位置
2、然后将.m2/repository/org/apache/maven/plugins目录下的文件夹全部删除
3、选中maven项目,右键--》maven--》update让maven重新下载依赖包
问题解决
【注】此IDE自带maven插件,不需要再自己下载安装maven插件