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

PMD plugin should use maven artifactId if project name is not set

    Details

    • Similar Issues:

      Description

      None of our POMs set the project name. This appears to prevent the PMD plugin from presenting the issues categorized by maven module (no "modules" tab).

      I tried setting <name>${project.artifactId}</name> in the parent POM, but this ended up being literally quoted.

      The findbugs plugin works as expected.

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          Is this in a maven or freestyle job? I thought that variables should be resolved in maven jobs.

          Show
          drulli Ulli Hafner added a comment - Is this in a maven or freestyle job? I thought that variables should be resolved in maven jobs.
          Hide
          philipa Philip Aston added a comment -

          Its a maven job, with a multi-module project.

          Show
          philipa Philip Aston added a comment - Its a maven job, with a multi-module project.
          Hide
          drulli Ulli Hafner added a comment - - edited

          When I do not set the name in the pom then the artifact ID is used. Is your name empty or just not set? Can you please attach the pmd-warnings.xml file that is stored by my plugin in the build folder? Or a small sample project that reproduces the bug?

          Show
          drulli Ulli Hafner added a comment - - edited When I do not set the name in the pom then the artifact ID is used. Is your name empty or just not set? Can you please attach the pmd-warnings.xml file that is stored by my plugin in the build folder? Or a small sample project that reproduces the bug?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/analysis/core/HealthAwareReporter.java
          http://jenkins-ci.org/commit/analysis-core-plugin/03d75c2c1f3cc26f67309b02191a782379d08873
          Log:
          [FIXED JENKINS-19904] If project name is empty use the artifact ID.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/HealthAwareReporter.java http://jenkins-ci.org/commit/analysis-core-plugin/03d75c2c1f3cc26f67309b02191a782379d08873 Log: [FIXED JENKINS-19904] If project name is empty use the artifact ID.
          Hide
          philipa Philip Aston added a comment - - edited

          The name is not set. I've tried setting it with no difference.

          But it looks like you found the problem anyway.

          Many thanks, I'll look forward to the next release.

          Show
          philipa Philip Aston added a comment - - edited The name is not set. I've tried setting it with no difference. But it looks like you found the problem anyway. Many thanks, I'll look forward to the next release.
          Hide
          drulli Ulli Hafner added a comment -

          Actually I did not find the problem. I just added another improvement: if the name tag is present but empty, then the module name will be empty too. That was a guess about your problem but seems to be unrelated...

          Maybe you could attach the file? Then I can check what the value of the module tag is in your warnings.

          Show
          drulli Ulli Hafner added a comment - Actually I did not find the problem. I just added another improvement: if the name tag is present but empty, then the module name will be empty too. That was a guess about your problem but seems to be unrelated... Maybe you could attach the file? Then I can check what the value of the module tag is in your warnings.
          Hide
          philipa Philip Aston added a comment -

          I'd have to produce a test case. (Its internal code, and there's about 80 pom files).

          Seeing no-one else is waiting for this, let me pick up the fix in your next release and I'll report back on whether it works.

          Show
          philipa Philip Aston added a comment - I'd have to produce a test case. (Its internal code, and there's about 80 pom files). Seeing no-one else is waiting for this, let me pick up the fix in your next release and I'll report back on whether it works.
          Hide
          drulli Ulli Hafner added a comment -

          ok.

          Show
          drulli Ulli Hafner added a comment - ok.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              philipa Philip Aston
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: