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

Need ability to protect (or exclude) resource from being destroyed during war overlay.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.1
    • 2.1-alpha-1
    • None
    • None

    Description

      If you have a template war TEMPLATE.war that is used to overlay the current project war CURRENT.war, and there are values in the CURRENT.war that should never be overlaid, a mechanism needs to exist to protect those resources.

      Example:

      template.war uses xwork - /WEB-INF/classes/xwork.xml
      current.war also uses xwork.

      when you overlay template.war onto current.war you want to prevent /WEB-INF/classes/xwork.xml from being overwritten.

      desired.

      <plugin>
        <groupId>org.apache.maven.plugin</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <protectionFileSets>
            <protectionFileSet>
              <directory>/WEB-INF</directory>
              <includes>
                <include>classes/xwork.xml</include>
              </includes>
            </protectionFileSet>
          </protectionFileSets>
        </configuration>
      </plugin>
      

      You can use the maven-shared/file-management FileSet implementation to perform this (see maven-clean-plugin) for example usage.

      Attachments

        Issue Links

          Activity

            People

              snicoll Stephane Nicoll
              joakime Joakim Erdfelt
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: