Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to prevent idea auto resolve maven dependency

Tags:

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

     <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

like image 778
JonyFan Avatar asked Dec 23 '16 06:12

JonyFan


People also ask

Why Maven dependencies are not getting downloaded in IntelliJ?

If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.

How disable Maven build in IntelliJ?

In the Maven tool window, right-click the project that you want to ignore. From the context menu, select Ignore Project. In the window that opens, click Yes if you want to remove the project from the Projects tool window.


1 Answers

I'm guessing you have enabled the "Import Maven projects automatically" option. To disable it, go to Preferences... > Build, Execution, Deployment > Build Tools > Maven > Importing, then uncheck the option from there, like so:

Preferences Screenshot

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:

Context Menu Screenshot

like image 125
Jonathan Sudiaman Avatar answered Sep 23 '22 16:09

Jonathan Sudiaman