简体   繁体   中英

How do I use my maven user settings.xml in IntelliJ?

I am having own customized maven settings.xml and using same in Eclipse IDE, which is working fine. I want to configure same settings.xml for intellij IDE. So I used same but it is not working. As per my understanding maven setting will be same for both.

So, can we same settings.xml for both or do I need to configure in different way for intellij.

As mentioned by @JF Meier the Maven settings.xml is independent of IDE. Maybe you should check the maven setting in Intellij and point to the correct installation.

File -> Settings -> Search for Maven -> Verify the configured maven directory

By default, IntelliJ IDEA uses settings.xml in the m2 repo ( ~/.m2/settings.xml on Linux for example). You can override this by using the Override checkbox for User settings file in the Maven configuration for IntelliJ. See documentation for how to go about that here: https://www.jetbrains.com/help/idea/new-projects-from-scratch-maven-settings-page.html

So you should be able to use that to point maven to your custom Maven settings.xml . I could do so myself with Intellij IDEA 2021.2.3 Ultimate Edition.

Maven settings.xml is not dependent on the IDE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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