Selena: How can I programmatically import a pom.xml as an IntelliJ project?

Hi,

I've generated a pom.xml along with a maven project structure and would like to point IntelliJ to the pom.xml file and tell it to load it as a project.

From what I've seen ProjectManager.getInstance().loadAndOpenProject("path to pom.xml"); is not enough because it does not create the modules of the project and leaves me with an almost empty project containing only the pom.xml.

Thanks in advance,

Raymond

2 comments
Comment actions Permalink

Hello Raymond,

I've generated a pom.xml along with a maven project structure and
would like to point IntelliJ to the pom.xml file and tell it to load
it as a project.

From what I've seen
ProjectManager.getInstance().loadAndOpenProject("path to pom.xml"); is
not enough because it does not create the modules of the project and
leaves me with an almost empty project containing only the pom.xml.


ProjectUtil.openOrImport()

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

That's it!!! Thanks Dmitry!

0

Please sign in to leave a comment.