title: Staged deployment of snapshot artifacts with Maven and Jenkins
body: <h2>Problem Description</h2>
  
  <p>We have several multi-module projects which are depending on each other. So something like this:</p>
  
  <ul>
  <li><strong>messaging</strong></li>
  <li><strong>framework</strong></li>
  <li><strong>othercomponent</strong></li>
  </ul>
  
  <p>They have separate source control repository, and lets say, that submodules inside <strong>messaging</strong> and <strong>othercomponent</strong> are using bundles from the submodules of <strong>framework</strong>. All of the projects are OSGI based multi-module maven projects. All of them have a server part, and a single sourced GUI part (Eclipse RAP+RCP). So this ends up in a three step maven based build for all of these multi-module projects <em>(since Tycho builds cannot be mixed with plain old Maven Builds)</em>:</p>
  
  <ul>
  <li>Building server part</li>
  <li>Building RAP GUI part </li>
  <li>Building RCP GUI part</li>
  </ul>
  
  <p>And finally there is an <em>end product</em> multi-module maven project (lets call it <strong>ourproduct</strong>), which uses <strong>messaging</strong>, <strong>framework</strong> and <strong>othercomponent</strong>. The project <strong>ourproduct</strong> has different version number than the other three, which are having a common version number.</p>
  
  <p>We build the whole thing with Jenkins, and the jobs trigger each other depending on the dependency tree. The company decided to use snapshots to get more direct and fast feedback between the 3 framework project developers and the <strong>ourproduct</strong> developers. This can be a nice idea, however there is a big problem.</p>
  
  <p>If during the building chain something is broken, than the snapshot repository contains snapshots of <strong>messaging</strong>, <strong>framework</strong> and <strong>othercomponent</strong>, which cannot work together. This way the developers of <strong>ourproduct</strong> have to wait for a working snapshot set (otherwise they cannot even compile some time). An other problem is that during the build the set of snapshots are also not consistent.</p>
  
  <h2>Idea</h2>
  
  <p>For the <strong>messaging</strong>, <strong>framework</strong> and <strong>othercomponent</strong> there is a definite <em>end job</em> in Jenkins. If that finishes, then the set of snapshots must be working, so the <strong>ourproduct</strong> team could use it. <strong>So i would need to COLLECT somehow the snapshots created by the build chain, and deploy them only if the whole build chain was successful.</strong></p>
  
  <ul>
  <li><strong>Is there any existing possibility to do this?</strong></li>
  </ul>
  
  <p>My idea was to simply change the jobs to make only <em>install</em> only and not <em>deploy</em>. Then at the end I could look for the built snapshots in the local maven repo, and deploy them by a script. </p>
  
  <ul>
  <li>There is some Staging Concept for Maven (maybe only with Nexus pro). Does it say anything about snapshots?</li>
  </ul>
  
  <p>Any idea is welcome. However i cannot change the fact of using snapshots. So there is no use in convincing me to use releases and no snapshots.</p>