Uploaded image for project: 'Maven Clean Plugin'
  1. Maven Clean Plugin
  2. MCLEAN-29

Maven clean plugin doesn't filter resources from exclude list

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Labels:
      None

      Description

      For example you want to delete content of folder but want to keep folder itself and it's SCM (e.g. SVN) information. Following configuration for "maven-maven-clean" plugin deletes all plain files under ".svn" directory and simply keeps empty subdirs. Thus, making update command impossible.

      <build>
        ...
        <plugins>
          <plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <configuration>
              <verbose>true</verbose>
              <filesets>
                <fileset>
                  <directory>logic/src/test/generated/resources</directory>
                  <excludes>
                    <exclude>.svn/**/*</exclude>
                  </excludes>
                  <includes>
                    <include>**/*</include>
                  </includes>
                  <followSymlinks>false</followSymlinks>
                </fileset>
              </filesets>
            </configuration>
          </plugin>
        </plugins>
      </build>
      

        Attachments

        1. clean-exclude.zip
          6 kB
          Benjamin Bentmann
        2. dont-delete-excluded-file-test.patch
          4 kB
          Benjamin Bentmann
        3. dont-delete-excluded-file.patch
          4 kB
          Benjamin Bentmann

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                antiso Vladimir Sosnin
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: