maven projects based on other file than pom.xml

Hi

Please make it possible to base a new project on a different maven file than "pom.xml".

After having tested IDEs with maven support for several years now, I still find that "mvn idea:idea -f workspace.xml"  is the only useable integration method. The main reason for that is that I hardly ever want the module set of the workspace to be the same as the unit-of-release in maven (which is what you effectively do with a shared parent pom multi-module project). I always want to add modules with common code that is shared across several projects to be part of the same workspace, so I can adapt and refactor it.

Typically, a workspace.xml file for a project looks like this:

<project>
  <modules>
     <module>.</module>
     <module>../core</module>
     <module>../billing/billing-client-api</module>
     <module>../customer/agreement-client-api</module>
     <module>../adminutils/</module>
     <module>../configutils/</module>
  </modules>
</project>

So, please make the maven integration up-to-par with mvn idea:idea by adding support for joining several "parent poms" together in a workspace.

-eirik

4 comments
Comment actions Permalink

can't you call that workspace file "pom.xml" ?

0
Comment actions Permalink

Of course not. There is already a file there called pom.xml, containing what I want to release as a single unit with maven. It is even included in the workspace.xml (module ".").

The problem is that we have common modules that are shared across several projects (under different departments). I want to have these as part of my workspace without necessarily building and releasing these together as a single unit. Also, the people working on the other projects want this as well. Using pom.xml-files can easily end up tying all modules (200+) together as a single unit/mess, far larger than any IDE supports.

Most directories already have "pom.xml"-files, so that name is take for other purposes (maven units-of-release).

It would be possible to create a new directory not used for other purposes and put the workspace root there (under the name "pom.xml"), but I don't know how IDE's feel about having the workspace root located in a hidden-away subdirectory (both in general, since people use different IDEs here, and Idea in particular, since that is what I'm using) . Most are designed to have the modules as subdirectories of the workspace root, not the other way around.

- eirik

0
Comment actions Permalink

[quote]It would be possible to create a new directory not used for other purposes and put the workspace root there (under the name "pom.xml"), but I don't know how IDE's feel about having the workspace root located in a hidden-away subdirectory (both in general, since people use different IDEs here, and Idea in particular, since that is what I'm using) [/quote]

Did you try that ? this is what I do.

You can use things like <module>../../../myParentModule/mySubModule/pom.xml</module> in your workspace pom if you want

0
Comment actions Permalink

In other words: while unconventional, it probably works. At least in Idea. I'll try that next time. thanks.

I still think IDEA and other IDEs should support non-pom.xml- rooted workspaces, though. I'm obviously not the only one who needs to have a workspace that is different/bigger than the pom.xml build-file structure says maven should care about.

0

Please sign in to leave a comment.