title: Complex profiles in maven
body: <p>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.</p>
  
  <p>Using some made-up command line syntax to illustrate what I'd like to see, I'd imagine typing in something like</p>
  
  <pre><code>mvn -Pmidp,debug,local-resources
  </code></pre>
  
  <p>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).</p>
  
  <p>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</p>
  
  <pre><code>-Pmidp-debug-localresources
  -Pmidp-release-localresources
  -Pmidp-debug-remoteresources
  -Pmidp-release-remoteresources
  ...
  </code></pre>
  
  <p>Each with its own frustratingly similar set of dependencies and build tag.</p>
  
  <p>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.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>The question isn't actually valid since I'd made a false assumption about the way maven works.</p>
  
  <pre><code>-Pmidp,debug,local-resources
  </code></pre>
  
  <p>does not do 3 builds. It in fact enables those 3 profiles on one build, which was ironically what I was looking for in the first place.</p>