Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17047

Make dependency to bundled ant plugin optional

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 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

    Description

      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)

      Attachments

        Issue Links

          Activity

            bgolding Ben Golding created issue -
            bgolding Ben Golding added a comment -

            Did this dependency change from 4.21 to 4.23?

            bgolding Ben Golding added a comment - Did this dependency change from 4.21 to 4.23?
            drulli 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.

            drulli 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.
            drulli Ulli Hafner made changes -
            Field Original Value New Value
            Component/s warnings [ 15513 ]
            drulli Ulli Hafner made changes -
            Link This issue is duplicated by JENKINS-17496 [ JENKINS-17496 ]
            drulli Ulli Hafner made changes -
            Labels DEVTOOLS
            drulli Ulli Hafner made changes -
            Issue Type Improvement [ 4 ] Bug [ 1 ]
            drulli Ulli Hafner made changes -
            Assignee Ulli Hafner [ drulli ] Sebastian Hansbauer [ habast ]
            drulli 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
            drulli 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
            drulli Ulli Hafner made changes -
            Assignee Sebastian Hansbauer [ habast ] Ulli Hafner [ drulli ]

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            src/main/java/hudson/plugins/analysis/core/AntBuilderCheck.java
            src/main/java/hudson/plugins/analysis/core/HealthAwareRecorder.java
            http://jenkins-ci.org/commit/analysis-core-plugin/f0f8dd454360d3c0bc320d2eb64abf48ee85471a
            Log:
            [FIXED JENKINS-17047] Make dependency to ant plug-in optional.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/java/hudson/plugins/analysis/core/AntBuilderCheck.java src/main/java/hudson/plugins/analysis/core/HealthAwareRecorder.java http://jenkins-ci.org/commit/analysis-core-plugin/f0f8dd454360d3c0bc320d2eb64abf48ee85471a Log: [FIXED JENKINS-17047] Make dependency to ant plug-in optional.
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/tasks-plugin/e27c6f4cda69f00abdb5a0720c7f050cf1967122
            Log:
            JENKINS-17047 Removed ant plug-in dependency.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/tasks-plugin/e27c6f4cda69f00abdb5a0720c7f050cf1967122 Log: JENKINS-17047 Removed ant plug-in dependency.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/pmd-plugin/af89097bc622017f8b768bc24f5fb4fa19f00299
            Log:
            JENKINS-17047 Removed ant plug-in dependency.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/pmd-plugin/af89097bc622017f8b768bc24f5fb4fa19f00299 Log: JENKINS-17047 Removed ant plug-in dependency.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            plugin/pom.xml
            http://jenkins-ci.org/commit/findbugs-plugin/58f1c2b838dab9f030a7951118b93c324eafddeb
            Log:
            JENKINS-17047 Removed ant plug-in dependency.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: plugin/pom.xml http://jenkins-ci.org/commit/findbugs-plugin/58f1c2b838dab9f030a7951118b93c324eafddeb Log: JENKINS-17047 Removed ant plug-in dependency.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/dry-plugin/d88fba666108d6e5bd1ee338ba454d630df79e49
            Log:
            JENKINS-17047 Removed ant plug-in dependency.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/dry-plugin/d88fba666108d6e5bd1ee338ba454d630df79e49 Log: JENKINS-17047 Removed ant plug-in dependency.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/checkstyle-plugin/d3c7d53eeda2dbee58aeeaebe9336b802e0bf1b3
            Log:
            JENKINS-17047 Removed ant plug-in dependency.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/checkstyle-plugin/d3c7d53eeda2dbee58aeeaebe9336b802e0bf1b3 Log: JENKINS-17047 Removed ant plug-in dependency.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/analysis-test-plugin/8556b236caa4fcd2c40cbf0f965f6214c88dcf18
            Log:
            JENKINS-17047 Removed ant plug-in dependency.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/analysis-test-plugin/8556b236caa4fcd2c40cbf0f965f6214c88dcf18 Log: JENKINS-17047 Removed ant plug-in dependency.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            http://jenkins-ci.org/commit/analysis-collector-plugin/17be5126d0f0f6235bfebacff19a4013b17ca427
            Log:
            JENKINS-17047 Removed ant plug-in dependency.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml http://jenkins-ci.org/commit/analysis-collector-plugin/17be5126d0f0f6235bfebacff19a4013b17ca427 Log: JENKINS-17047 Removed ant plug-in dependency.
            drulli Ulli Hafner added a comment -

            Integrated in Jenkins Analysis Plug-ins (Compile) #609
            [FIXED JENKINS-17047] Make dependency to ant plug-in optional. (Revision f0f8dd454360d3c0bc320d2eb64abf48ee85471a)

            Result = SUCCESS

            drulli Ulli Hafner added a comment - Integrated in Jenkins Analysis Plug-ins (Compile) #609 [FIXED JENKINS-17047] Make dependency to ant plug-in optional. (Revision f0f8dd454360d3c0bc320d2eb64abf48ee85471a) Result = SUCCESS
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 147878 ] JNJira + In-Review [ 192622 ]

            People

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

              Dates

                Created:
                Updated:
                Resolved: