Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-4808

Maven does not resolve variables within a plugin's <goal>

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: POM
    • Labels:
      None
    • Environment:
      Ubuntu 10.04 Lucid, w/ Maven 2.2.1 on 64bit system.

      Description

      I have a Maven project with a Hudson profile, to be run when run under Hudson CI. The only relevant part of the Hudson profile is that the build should not fail when there are checksyle or findbugs errors. To achieve this, I've defined goal variables for both Checkstyle and Findbugs, see the attached (simplified) POM.

      just run mvn:clean, and you'll get:
      '${checkstyle.goal}' was specified in an execution, but not found in the plugin

      (and later also for findbugs)

      The variable doesn't seem to be properly resolved. What's really strange, if I do mvn effective-pom, it all looks as I'd expect it, i.e it prints out <goal>check</goal> instead of <goal>${checkstyle.goal}</goal>

      This used to work perfectly under Maven 2.0.9, i.e. it would run checkstyle:check normally, but checkstyle:checkstyle under Hudson. Seems to be a regression.

        Attachments

        1. log
          4 kB
          Sven Ehlert
        2. pom.xml
          3 kB
          Sven Ehlert

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                dukat Sven Ehlert
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: