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

"Plugin usage" plugin does not report on Maven projects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: plugin-usage-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.609.3
      plugin-usage-plugin 0.3
    • Similar Issues:

      Description

      The usage information shown excludes all Maven projects:
      in plugin-usage-plugin/src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobCollector.java informations collected with

      List<Project> allItems = Jenkins.getInstance().getAllItems(Project.class);

      But a "Maven project" is not (in the Java class hierarchy of Jenkins) a hudson.model.Project. It's a hudson.model.AbstractProject, though.

        Attachments

          Issue Links

            Activity

            Hide
            rschupp Roderich Schupp added a comment - - edited
            Show
            rschupp Roderich Schupp added a comment - - edited possible cause of JENKINS-35159 , JENKINS-30673 , JENKINS-30805
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rschupp
            Path:
            src/main/java/org/jenkinsci/plugins/pluginusage/JobsPerPlugin.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuildWrapperJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuilderJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobCollector.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PropertiesJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PublisherJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/SCMJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/TriggerJobAnalyzer.java
            http://jenkins-ci.org/commit/plugin-usage-plugin/c5a849d3acec9c9095ed0c7caccc79fddd89739e
            Log:
            Fix https://issues.jenkins-ci.org/browse/JENKINS-41507

            Problem: "Plugin usage" plugin does not report on Maven projects
            ... since data is only collected for items that are instances of
            class hudson.model.Project. But a "Maven project" is not a Project.

            Solution:

            • globally replace hudson.model.Project with hudson.model.AbstractProject
            • fix up analyzers that call methods that really only work on a Project,
              either by ignoring items that aren't Projects (BuilderJobAnalyzer)
              or using another method that works on a wider range of items
              (BuildWrapperJobAnalyzer)
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rschupp Path: src/main/java/org/jenkinsci/plugins/pluginusage/JobsPerPlugin.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuildWrapperJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuilderJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobCollector.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PropertiesJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PublisherJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/SCMJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/TriggerJobAnalyzer.java http://jenkins-ci.org/commit/plugin-usage-plugin/c5a849d3acec9c9095ed0c7caccc79fddd89739e Log: Fix https://issues.jenkins-ci.org/browse/JENKINS-41507 Problem: "Plugin usage" plugin does not report on Maven projects ... since data is only collected for items that are instances of class hudson.model.Project. But a "Maven project" is not a Project. Solution: globally replace hudson.model.Project with hudson.model.AbstractProject fix up analyzers that call methods that really only work on a Project, either by ignoring items that aren't Projects (BuilderJobAnalyzer) or using another method that works on a wider range of items (BuildWrapperJobAnalyzer)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: chrissy25
            Path:
            src/main/java/org/jenkinsci/plugins/pluginusage/JobsPerPlugin.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuildWrapperJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuilderJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobCollector.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PropertiesJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PublisherJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/SCMJobAnalyzer.java
            src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/TriggerJobAnalyzer.java
            http://jenkins-ci.org/commit/plugin-usage-plugin/4a8fd2a54f2e8ff4c0d617bc630c1a9872c87803
            Log:
            Merge pull request #7 from rschupp/master

            Fix https://issues.jenkins-ci.org/browse/JENKINS-41507

            Compare: https://github.com/jenkinsci/plugin-usage-plugin/compare/31a68849b3a9...4a8fd2a54f2e

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: chrissy25 Path: src/main/java/org/jenkinsci/plugins/pluginusage/JobsPerPlugin.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuildWrapperJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/BuilderJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/JobCollector.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PropertiesJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/PublisherJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/SCMJobAnalyzer.java src/main/java/org/jenkinsci/plugins/pluginusage/analyzer/TriggerJobAnalyzer.java http://jenkins-ci.org/commit/plugin-usage-plugin/4a8fd2a54f2e8ff4c0d617bc630c1a9872c87803 Log: Merge pull request #7 from rschupp/master Fix https://issues.jenkins-ci.org/browse/JENKINS-41507 Compare: https://github.com/jenkinsci/plugin-usage-plugin/compare/31a68849b3a9...4a8fd2a54f2e
            Hide
            froque Filipe Roque added a comment -

            I am affected by this issue. Since there is a correction already, can we have a 0.4 release ?

            Show
            froque Filipe Roque added a comment - I am affected by this issue. Since there is a correction already, can we have a 0.4 release ?
            Hide
            froque Filipe Roque added a comment -

            Version 0.4 was relased in April. This issue can be resolved/closed. 

            Show
            froque Filipe Roque added a comment - Version 0.4 was relased in April. This issue can be resolved/closed. 

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rschupp Roderich Schupp
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: