intellij idea provides a cli. when you try to open a pom.xml and there are no intellij idea project files, the project will be imported. else the project will be opened.

i assume from your comments, that you import new projects on a regular base. so, open the pom.xml, wait a few seconds to give intellij the chance to create project files and then open the will open that file in your fresh imported project.

the following bash script worked for me:

idea pom.xml & sleep 5 && idea

don't know if that is an option, because i don't your way to work. do you like command lines or not aso.

read how to import a maven project with intellij command line tool with command "idea pom.xml"? in order to get cli working.

Related Query

More Query from same tag