title: Jenkins - Do not run build steps if there are no changes in git
body: <p>I was setting up jenkins to create war builds using git and maven . I have created a hook in bitbucket to invoke jenkins build also mentioned the branch name in jenkins to build in a specific branch . Issue is that whenever there is a new commit in any of the branches jenkins is building and redeploying the war file .
  What i need is , jenkins should abort the build if there are not change in git . Please help.</p>
  
  <p>EDIT:
  I did tried in maven level using plugin </p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
      &lt;configuration&gt;
          &lt;archive&gt;
              &lt;forced&gt;false&lt;/forced&gt;
          &lt;/archive&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;`
  </code></pre>
  
  <p>Still maven is building the war file if there are "No sources to compile."</p>