IDEA设置离线工作模式指南
更新时间:2026年06月27日 14:54:31 作者:小飞LOVE霞
这篇文章主要介绍了IDEA设置离线工作模式指南,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教
前言
由于工作环境的影响,我们通常在有网络的环境下做开发,但是由于特殊情况,我们需要在内网下用IDEA开发我们的程序。但是MAVEN在新的IDEA环境下会自动从互联网下拉取jar包,但是没网就很挠头。
怎么办??
那就看看下文我的解决方案。
一、设置IDEA在离线模式下工作
点击File-----》Settings

在Work offline前面打钩。
二、设置maven的setting文件

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>D:\maven\repository</localRepository>
<interactiveMode>true</interactiveMode>
<offline>true</offline>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>central</id>
<name>central</name>
<url>D:\maven\repository</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
</settings>三、删除
D:\maven\repository下所有的_remote.repositories文件
四、总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
MybatisPlusException:Failed to process,Error SQL异常报错的解决办法
这篇文章主要给大家介绍了关于MybatisPlusException:Failed to process,Error SQL异常报错的解决办法,文中通过实例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下2023-03-03
Spring Boot项目中JSON解析库的使用方法最佳实践
Spring Boot作为Java生态中最流行的微服务框架,提供了对多种JSON库的无缝集成支持,本文将深入探讨Spring Boot项目中主流JSON解析库的使用方法、性能对比及最佳实践,需要的朋友可以参考下2025-06-06
详解Spring Boot 2.0.2+Ajax解决跨域请求的问题
这篇文章主要介绍了详解Spring Boot 2.0.2+Ajax解决跨域请求的问题,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧2019-03-03


最新评论