Ulli Hafner edited a comment on Bug JENKINS-17047

Original code in HealthAwareRecorder:

protected boolean isAntBuild(final AbstractBuild<?, ?> build) {
        if (build.getProject() instanceof Project) {
            Project<?, ?> project = (Project<?, ?>)build.getProject();
            for (Builder builder : project.getBuilders()) {
                if (builder instanceof Ant) {
                    return true;
                }
            }
        }
        return false;
    }

  1. Needs to be wrapped with:
    if (Jenkins.getInstance().getPlugin("ant") != null) {
                
    }
  2. Wrapped code must be moved to a new class with static method isAntBuild
  3. static method isAntBuild should return false if ClassNotFoundException is thrown
  4. ant dependency in pom.xml should be made optional
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to