build module from an alternatively named pom.xml file?

I was asked for help today by another team in my firm.

It turns out that they have a pom.xml file for normal builds, but also another pom file named pom_alt.xml which is supposed to build an alternate source path.  Maven2 does support renaming of pom.xml, for example, on the comand line, you can execute

mvn -f pom_alt.xml ...

It was trivial to setup an IntelliJ module which uses the normal pom.xml file, but I was unable to figure out how to create another IntelliJ module for the pom_alt.xml file.  In the new module wizard, you can only specify the "Root directory", and IntelliJ automatically finds files named pom.xml (immediately inside it, or you can even have it recursively search, which is slick).

Does anyone know how to get IntelliJ to open alternatively named pom files?


Vladimir: thanks for the link.  Not sure why my search did not find it!

If any IntelliJ developers are reading this, do you have any thoughts as to if/when this could handled?


Please sign in to leave a comment.