How to execute mvn command using IntelliJ IDEA?

2019-01-27 12:07发布

问题:

I am trying to add Oracle JDBC driver in my local Maven repo. I have found this link to do so.

I want to do the same from Inside IntelliJ IDEA. Is there any way to execute mvn commands from IntelliJ IDEA?

回答1:

There is a button in maven menu of Intellij IDEA:

Also you can always use "Terminal"



回答2:

You can check the Image :

If you don't fine the Maven Projects there then you can open it from Bottom Left part of Intellij IDEA, there's one Square Button there. click on it.

If You don't have configure the maven path then you also need to configure maven directory also. Using maven settings.



回答3:

In the Edit Configurations you can specify a Maven configuration which allows you to execute Maven goals.

That said, I recommend to add the library to a Maven Repository such as Nexus. Then you can use the library like any other dependency and don't have to wory about the local repositories yourself.