You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2006/03/31 01:45:50 UTC

Re: svn commit: r389663 - /maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java

Some questions:

epunzalan@apache.org wrote:
> Author: epunzalan
> Date: Tue Mar 28 19:21:05 2006
> New Revision: 389663
> 
> URL: http://svn.apache.org/viewcvs?rev=389663&view=rev
> Log:
> PR: MWAR-12
> Submitted by: Brian Topping, John Tolentino
> 
> Allowed resource filtering to war plugin
> 
> +    /**
> +     * @parameter
> +     */
> +    private List filters;

These don't appear to be used.

> +
> +    /**
> +     * @parameter
> +     */
> +    private Properties filterProperties;

Why new properties, not the normal build filters?

> -            copyResources( getWarSourceDirectory(), webappDirectory, getWebXml(), getContainerConfigXML() );
> +            if ( ( webResources != null ) && ( webResources.size() > 0 ) )
> +            {
> +                for ( Iterator it = webResources.iterator(); it.hasNext(); )
> +                {
> +                    Resource resource = (Resource) it.next();
> +                    copyResources( resource, webappDirectory );
> +                }
> +            }
> +            else
> +            {
> +                copyResources( getWarSourceDirectory(), webappDirectory );
> +            }

Why either/or? If both are set, should both be copied?

> +                String[] fileNames = getWarFiles( resource );
> +                for ( int i = 0; i < fileNames.length; i++ )
> +                {
> +                    copyFileIfModified( new File( resource.getDirectory(), fileNames[i] ),
> +                                        new File( webappDirectory, fileNames[i] ), resource.isFiltering() );
> +                }

I think you need to copy always if filtering is true, so that it is
recopied if the filters change but the file doesn't.

- Brett

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