Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-153

Resource filtering breaks when run from parent POM.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2
    • 2.1-alpha-1
    • None
    • None
    • maven 2.08
      Windows and solaris

    Description

      <webResources><resource><directory> breaks when run from a parent pom.

      When you define a resource directory for filtering, you must define it relative to the POM. When run from the war project's pom eveything works. When run from the parent you get an error

      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] basedir src\main\webapp\WEB-INF does not exist
      [INFO] ------------------------------------------------------------------------
      [DEBUG] Trace

      This is of course because the directory is relative to the child pom, where the plugin configuration was defined, not relative to the parent pom.

      I have attached an example project that demonstrates the bug.
      To repoduce

      • Run mvn package from the child my-app project everything works.
      • run mvn pacakge from the parent directory you will get the error.

      Attachments

        1. test.zip
          4 kB
          Keith Ganger

        Activity

          People

            Unassigned Unassigned
            kganger Keith Ganger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: