打包war包出错

打包war包出错

出错信息如下:

[INFO] Scanning for projects...

[INFO] 

[INFO] --------------------------< com.imooc:maven >---------------------------

[INFO] Building maven 1.0.0-RELEASE

[INFO] --------------------------------[ war ]---------------------------------

[WARNING] The POM for org.apache.maven.plugins:maven-war-plugin:jar:3.3.2 is missing, no dependency information available

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  0.229 s

[INFO] Finished at: 2019-07-05T16:29:45+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Plugin org.apache.maven.plugins:maven-war-plugin:3.3.2 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-war-plugin:jar:3.3.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/PluginResolutionException

pom.xml文件配置如下

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.imooc</groupId>
  <artifactId>maven</artifactId>
  <version>1.0.0-RELEASE</version>
  <!-- packing代表输出的格式,如果没有 写,则默认输出的是jar包 -->
  <packaging>war</packaging>
  <dependencies>
  	<dependency>
	  <groupId>javax.servlet</groupId>
	  <artifactId>jstl</artifactId>
	  <version>1.2</version>
	 </dependency>	
  </dependencies>
 <build>
    <plugins>
    	<plugin>
    		<groupId>org.apache.maven.plugins</groupId>
    		<artifactId>maven-war-plugin</artifactId>
    		<version>3.3.2</version>
    	</plugin>
    </plugins>
</build>
  
</project>


正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学你好,可以检查一下自己的本地maven仓库,找到org.apache.maven.plugins对应目录。

http://img1.sycdn.imooc.com//climg/5d1f15e4000109e606610554.jpg

删去lastUpdated文件:

http://img1.sycdn.imooc.com//climg/5d1f171b000103c906890282.jpg

如果解答了同学的疑问,望采纳~

祝学习愉快~


问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师