IDEA 打包上传提示“Cannot deploy artifacts when Maven is in offline mode”

一、引言

        昨天在使用maven deploy命令进行打包上传的时候,IDEA突然提示错误:

“Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project scc-fx-core-accessweb: Cannot deploy artifacts when Maven is in offline mode”

如下图所示:

无法进行打包上传。

二、解决方法:

       1、点击菜单栏“File”->"Settings"

         2、选择“Build,Execution,Deployment”->“Build Tools”->“Maven”,将勾选的“Work  offline”去掉,点击"OK"保存即可。

 


版权声明:本文为GyaoG原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。