You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Carsten Ziegeler <cz...@apache.org> on 2005/08/20 18:58:28 UTC

[M2] Bug in war plugin?

I'm trying to find some strange behaviour with the packaging of the war
plugin and came across this code in the WarMojo:

  public void copyResources( ... ) {
     if ( !sourceDirectory.equals( webappDirectory ) ) {
         ...
         if ( warSourceDirectory.exists() )  {
             ...
             FileUtils.copyFile(new File( sourceDirectory, ... );
         }

Now from what I see here, I think the copyFile operation should work
on the warSourceDirectory and not on the sourceDirectory. WDYT?

Carsten
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [M2] Bug in war plugin?

Posted by Carsten Ziegeler <cz...@apache.org>.
Brett Porter schrieb:
> It's a bit confusing - warSourceDirectory actually is sourceDirectory
> (its passed in as a parameter). Given that the copyResources method
> isn't static and only used once, it probably would be better to remove
> the first two parameters and use the fields passed in instead.
> 
Ah, yes, now I see it - sorry for the noise.

Thanks
Carsten


-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [M2] Bug in war plugin?

Posted by Brett Porter <br...@apache.org>.
It's a bit confusing - warSourceDirectory actually is sourceDirectory
(its passed in as a parameter). Given that the copyResources method
isn't static and only used once, it probably would be better to remove
the first two parameters and use the fields passed in instead.

- Brett

Carsten Ziegeler wrote:

>I'm trying to find some strange behaviour with the packaging of the war
>plugin and came across this code in the WarMojo:
>
>  public void copyResources( ... ) {
>     if ( !sourceDirectory.equals( webappDirectory ) ) {
>         ...
>         if ( warSourceDirectory.exists() )  {
>             ...
>             FileUtils.copyFile(new File( sourceDirectory, ... );
>         }
>
>Now from what I see here, I think the copyFile operation should work
>on the warSourceDirectory and not on the sourceDirectory. WDYT?
>
>Carsten
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org