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
            Priority: Minor


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:

            <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>

The problem is that when we want to clean an extra directory out of a module, 
say for example, generated-sources:

            <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>

We then see the following when we run "mvn clean":

FO] 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] ------------------------------------------------------------------------

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

        

Reply via email to