Complex profiles in maven
I've been looking at profiles in maven for selecting different sets of dependencies. This is fine when you want to build say a debug build differently from a release build. My problem is that I want to do a fair bit more than this. For my application (Mobile Java app where J2ME is just one target among many) there may be a large number of possible combinations of variations on a build.

Using some made-up command line syntax to illustrate what I'd like to see, I'd imagine typing in something like

    mvn -Pmidp,debug,local-resources

What Maven does in this case is to build three different builds. What I want to do is use those three (Or more, or less) switches to affect just one build. So I'd get a MIDP-targetting debug build with 'local resources' (Whatever that might mean to me - I'm sure you can imagine better examples).

The only way I can think of doing this would be to have lots and lots of profiles which becomes quite problematic. In my example, I'd have

    -Pmidp-debug-localresources
    -Pmidp-release-localresources
    -Pmidp-debug-remoteresources
    -Pmidp-release-remoteresources
    ...

Each with its own frustratingly similar set of dependencies and build tag.

I'm not sure I've explained my problem well enough, but I can re-write the question to clarify it if comments are left.

Complex profiles in maven
===

I've been looking at profiles in maven for selecting different sets of dependencies. This is fine when you want to build say a debug build differently from a release build. My problem is that I want to do a fair bit more than this. For my application (Mobile Java app where J2ME is just one target among many) there may be a large number of possible combinations of variations on a build.

Using some made-up command line syntax to illustrate what I'd like to see, I'd imagine typing in something like

    mvn -Pmidp,debug,local-resources

What Maven does in this case is to build three different builds. What I want to do is use those three (Or more, or less) switches to affect just one build. So I'd get a MIDP-targetting debug build with 'local resources' (Whatever that might mean to me - I'm sure you can imagine better examples).

The only way I can think of doing this would be to have lots and lots of profiles which becomes quite problematic. In my example, I'd have

    -Pmidp-debug-localresources
    -Pmidp-release-localresources
    -Pmidp-debug-remoteresources
    -Pmidp-release-remoteresources
    ...

Each with its own frustratingly similar set of dependencies and build tag.

I'm not sure I've explained my problem well enough, but I can re-write the question to clarify it if comments are left.
