On Jan 10, 2008 12:11 AM, Brian E. Fox <[EMAIL PROTECTED]> wrote:
> 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

Maybe the intention was to base relative file names at basedir? This
should however be done correctly of course.

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

Reply via email to