title: How to use platform architecture in Maven to determine dependency?
body: <p>As the question states is there a nice way to use dependencies based on the platform architecture while building maven artefacts. I know about profiles and how to use them. For this special purpose i dont want to incorporate them into my build.</p>
  
  <p><em>The problem in detail could be described as follows:</em></p>
  
  <ul>
  <li>Multi module maven project</li>
  <li>Continous integration and people on the project use evenly distributed platform architectures</li>
  <li>Dependency to native system library</li>
  </ul>
  
  <p><em>Solutions which i do not want to use in the settings:</em></p>
  
  <ul>
  <li>No dependency redundancy</li>
  <li><strong>No maven profiles</strong> (or at least maven profiles which are automatically chosen by platform architecture)</li>
  </ul>
  
  <p><em>As an example</em>:</p>
  
  <p><strong>Person1</strong></p>
  
  <ul>
  <li>(using linux i686) builds project</li>
  <li>x86 libaries are bundled to every subproject and the resulting artefacts are being build</li>
  </ul>
  
  <p><strong>Person2</strong> </p>
  
  <ul>
  <li>(using win32) builds project</li>
  <li>32 bit librariers are bundled as above</li>
  </ul>
  
  <p><strong>Continous integration</strong></p>
  
  <ul>
  <li>is running like the production environment on linux amd64</li>
  <li>integrate amd64 libraries </li>
  </ul>
  
  <p><strong>Edit about Profiles</strong></p>
  
  <p>I know that profiles are one solution to do this. But what i want to achieve is that you checkout your project from some random source version control and build a project with native libraries out of the box without doing anything (as long as the platform meets the requirement of the configured ones). </p>
  
  <p>I do not want to configure these profile settings nor i want to run a specific target explicitally. If there is such thing with profiles i would like to see an example which determines automatically the platform architecture and runs a target. IF there is one without profiles i would prefer it because it is much less complex while having different existent combinations of profiles(including tests and other usecases).</p>
  
  <p>Having solely profiles feels a little bloated to me and manual efforts are required.</p>
  
  <p>I hope someone has a neat suggestion because im somehow stuck on this.</p>