简体   繁体   English

如何防止想法自动解决maven依赖

[英]how to prevent idea auto resolve maven dependency

I am new to idea and maven ,I find that every time, when I am edit the dependency in the pom.xml ,before I finished writing, idea tryed to resolve the dependency and create some folder in my native repo , for example , when I am edit the dependency, and it looks like this now 我是想法和maven的新手,我发现每次,当我编辑pom.xml中的依赖项时,在我写完之前,想法试图解决依赖关系并在我的本机仓库中创建一些文件夹,例如,我正在编辑依赖项,现在看起来像这样

     <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-a</artifactId>
    </dependency>

idea has create a folder in my native repo like this ,how to prevent it and I have set my setting like this ,but it seems no use, and the file is auto saved as usual 想法在我的像本地回购创建一个文件夹 ,如何防止它。我将我的设置像这样 ,但似乎没有用,而该文件自动保存照常

I'm guessing you have enabled the "Import Maven projects automatically" option. 我猜你已经启用了“自动导入Maven项目”选项。 To disable it, go to Preferences... > Build, Execution, Deployment > Build Tools > Maven > Importing , then uncheck the option from there, like so: 要禁用它,请转到Preferences... > Build, Execution, Deployment > Build Tools > Maven > Importing ,然后从那里取消选中该选项,如下所示:

首选项截图

After doing so, it will be up to you to run the imports when you're ready. 完成后,您可以在准备好后运行导入。 To import manually, right-click your project in the Project view, then click Maven > Reimport : 要手动导入,请在“项目”视图中右键单击项目,然后单击“ Maven > Reimport

上下文菜单截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM