Stop building if I have an inspection problem


I have a build configuration wich has a couple of build step. One of them is an ANT build step (Has to be ANT), wich has a target called pmd, that run an inspection PMD.
Well, after these build step I have others with another kind of funcionalities, wich has the "Execute step" in: "If all previous steps finished successfully (zero exit code)". But at this moment despite I have an inspection problem with the PMD, the othres buils step run anyway, and I would like the build stop and finish at the moment wich a problem inspection has been detected.

-I have a Failure condition, that detect if I have problems with the inspection and it works good: the build fails, but all the next builds step run anyway.

-On the other hand,  is the information (that failed inspections) available in any environment variables? These could be useful

Please, if anyone has an idea it would be great.

Thank you


P.D. I am sorry for my english, I am learning :)


<java classname="net.sourceforge.pmd.PMD" failonerror="true" fork="true" output="...\DIR">
  <jvmarg value="-Djava.ext.dirs=...\DIR"/>

            <arg value="-d"/>
              <arg value="...\DIR"/>
              <arg value="-f"/>
              <arg value="xml"/>
              <arg value="-R"/>
              <arg value="... \DIR"/>

1 comment
Comment actions Permalink


Could you please try to use option "Only if build status is successful"? For more details please read this comment for related issue issue and suggested solution.


Please sign in to leave a comment.