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.
EDIT: I did tried in maven level using plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<forced>false</forced>
</archive>
</configuration>
</plugin>`
Still maven is building the war file if there are "No sources to compile."