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

Overlays break first-win rule for web resource with target path ending with '/'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6
    • 3.2.3
    • overlay

    Description

      I have WAR 'generic' containing 2 files: x/a1.txt and x/a2.txt
      I have WAR 'custom' with two source files: src/main/custom/a1.txt and src/main/custom/a2.txt and settings:

      <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <webResource>
              <directory>src/main/custom</directory>
              <includes><include>a1.txt</include></includes>
      	<targetPath>x/</targetPath>
            </webResource>
            <webResource>
               <directory>src/main/custom</directory>
               <includes><include>a2.txt</include></includes>
               <targetPath>x</targetPath>
             </webResource>
            </webResources>
      </configuration>
      

      Note that targetPath is different: x/ vs x

      When I build WAR 'custom'

      Actual: a1.txt is generic, a2.txt is custom
      Expected a1.txt and a2.txt are custom

      Attachments

        1. custom-0.0.1-SNAPSHOT.war
          3 kB
          W.Alphonse Harouny
        2. mwar371-20180905
          3 kB
          W.Alphonse Harouny

        Activity

          People

            eolivelli Enrico Olivelli
            michaldo Michal Domagala
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m