[ http://jira.codehaus.org/browse/MCLEAN-33?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MCLEAN-33. ----------------------------------- Assignee: Benjamin Bentmann Resolution: Fixed Fix Version/s: 2.3 Added new parameter {{excludeDefaultDirectories}} in [r692713|http://svn.apache.org/viewvc?view=rev&revision=692713]. > Cannot Supress Default clean while still cleaning > ------------------------------------------------- > > Key: MCLEAN-33 > URL: http://jira.codehaus.org/browse/MCLEAN-33 > Project: Maven 2.x Clean Plugin > Issue Type: New Feature > Affects Versions: 2.1.1 > Reporter: Joshua Pollak > Assignee: Benjamin Bentmann > Priority: Minor > Fix For: 2.3 > > > We would like to configure clean in our parent pom to remove the log files in > logs in all our child modules. We've done that like this: > {code:xml} > <plugin> > <artifactId>maven-clean-plugin</artifactId> > <version>2.1.1</version> > <configuration> > <filesets> > <fileset> > <directory>${basedir}/logs</directory> > <followSymlinks>false</followSymlinks> > <excludes> > <exclude>**/.svn</exclude> > </excludes> > </fileset> > </filesets> > </configuration> > </plugin> > {code} > The problem is that when we want to clean an extra directory out of a module, > say for example, generated-sources: > {code:xml} > <plugin> > <artifactId>maven-clean-plugin</artifactId> > <version>2.1.1</version> > <executions> > <execution> > <id>gensrc</id> > <phase>clean</phase> > <goals> > <goal>clean</goal> > </goals> > <configuration> > <filesets> > <fileset> > <directory>generated-sources</directory> > <followSymlinks>false</followSymlinks> > </fileset> > </filesets> > </configuration> > </execution> > </executions> > </plugin> > {code} > We then see the following when we run "mvn clean": > {noformat} > [INFO] Building Generated Sources > [INFO] task-segment: [clean] > [INFO] > ------------------------------------------------------------------------ > [INFO] [clean:clean] > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target/classes > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target/test-classes > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target/site > [INFO] Deleting file-set: > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/logs (included: [], > excluded: [**/.svn]) > [INFO] [clean:clean {execution: gensrc}] > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target/classes > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target/test-classes > [INFO] Deleting directory > /Users/jpollak/src/software/projects/mhs/trunk/mhs-gensrc/target/site > [INFO] Deleting file-set: generated-sources (included: [], excluded: > [**/.svn]) > [INFO] > ------------------------------------------------------------------------ > {noformat} > It would be nice to suppress cleaning target a second time. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira