• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • analysis-core-plugin
    • Core 1.504
      Warnings 4.23
      Analysis-Core 1.49

      Red Hat Enterprise Linux 6.2 64 bit
      Sun Java 1.6.0_20

      Make dependency from warnings to (bundled) ant plugin optional.

      We don't use Ant or Java in our Jenkins. All other bundled plugins were removed from jenkins.war (purpose: keep '/pluginManager/installed' UI list manageable, save a little disk space)

      (similar to JENKINS-14727 for maven dependency, that is now optional)

          [JENKINS-17047] Make dependency to bundled ant plugin optional

          Ben Golding created issue -

          Ben Golding added a comment -

          Did this dependency change from 4.21 to 4.23?

          Ben Golding added a comment - Did this dependency change from 4.21 to 4.23?

          Ulli Hafner added a comment -

          I'm depending now on Jenkins 1.424. Some Jenkins classes were moved to the ant plug-in, so I needed to add that dependency in order to get the code compiled.

          But the dependency is in the m2 code so it could be made optional.

          Ulli Hafner added a comment - I'm depending now on Jenkins 1.424. Some Jenkins classes were moved to the ant plug-in, so I needed to add that dependency in order to get the code compiled. But the dependency is in the m2 code so it could be made optional.
          Ulli Hafner made changes -
          Component/s Original: warnings [ 15513 ]
          Ulli Hafner made changes -
          Link New: This issue is duplicated by JENKINS-17496 [ JENKINS-17496 ]
          Ulli Hafner made changes -
          Labels New: DEVTOOLS
          Ulli Hafner made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          Ulli Hafner made changes -
          Assignee Original: Ulli Hafner [ drulli ] New: Sebastian Hansbauer [ habast ]

          Ulli Hafner added a comment - - edited

          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

          Ulli Hafner added a comment - - edited 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 ; } Needs to be wrapped with: if (Jenkins.getInstance().getPlugin( "ant" ) != null ) { } Wrapped code must be moved to a new class with static method isAntBuild static method isAntBuild should return false if ClassNotFoundException is thrown ant dependency in pom.xml should be made optional
          Ulli Hafner made changes -
          Assignee Original: Sebastian Hansbauer [ habast ] New: Ulli Hafner [ drulli ]

            drulli Ulli Hafner
            bgolding Ben Golding
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: