title: Passing $CATALINA_HOME to Maven build task of Jenkins
body: <p>I am setting up a continuous integration system currently and it works pretty well. This is how it currently looks like</p>
  
  <pre><code>Tomcat7 with  
  |- Sonar  
  |- Jenkins (latest LTS version)
  |  |- Maven Build  
  |     | - mvn clean install
  |     | - mvn site-deploy
  |     | - sonar analysis
  |- Site for the Maven Build
  </code></pre>
  
  <p>This makes a working build including serving the result of <code>mvn site</code> through the tomcat.</p>
  
  <p>However, pushing the site-reports to the proper location within tomcat works <em>only</em> because I hardcoded <code>file://path/to/tomcat/webapps/site/</code> in the pom.xml like</p>
  
  <pre><code>&lt;distributionManagement&gt;
      &lt;site&gt;
          &lt;id&gt;local&lt;/id&gt;
          &lt;name&gt;local&lt;/name&gt;
          &lt;url&gt;file://path/to/tomcat/webapps/site/&lt;/url&gt;
      &lt;/site&gt;
  &lt;/distributionManagement&gt;
  </code></pre>
  
  <p><strong>Problem:</strong><br>
  This badly couples the maven config to the location of the tomcat on the CI server, which I think should be circumvented.</p>
  
  <p><strong>Question 1:</strong><br>
  Can I somehow pass $CATALINA_HOME to the corresponding Maven task launched by jenkins?</p>
  
  <p><strong>Question 2:</strong><br>
  Is there probably a better way for supplying the site-reports, preferably without installing a separate webserver?</p>