I had a chat on #maven with someone trying to delete a folder external
to his source tree. This works fine when running the child directly, but
in a reactor build it doesn't work. I peeked at the code and was
surprised to find this:

  try
                {
                    getLog().info( "Deleting " + fileset );

                    if ( !project.isExecutionRoot() )
                    {
                        String projectBasedir = StringUtils.replace(
project.getBasedir().getAbsolutePath(),
 
"\\", "/" );
                        String filesetDir = StringUtils.replace(
fileset.getDirectory(), "\\", "/" );

                        if ( filesetDir.indexOf( projectBasedir ) == -1
)
                        {
                            fileset.setDirectory( projectBasedir + "/" +
filesetDir );
                        }
                    }

                    fileSetManager.delete( fileset, failOnError );
                }


First issue is the log lies...it doesn't delete what it says it is.
Second, why do we manipulate the path at all (let alone only in a
reactor build)? It seems to me like this whole chunk should go away.

--Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to