You are specifying version 2.0.2.

The website docs appear to be for 2.1-alpha-2 (note the Last Published
etc near the top left corner). I would try that version instead, with
this configuration, perhaps the NPE will go away.

Wayne

On Sun, Oct 12, 2008 at 7:07 PM, Alex Coles <[EMAIL PROTECTED]> wrote:
> I am encountering problems trying to exclude certain file types from
> my WAR files. My WAR files are bloated, and becoming difficult to very
> cumbersome to deploy to production servers.
>
> Here's the two main types of files that should not be included in my WARs:
>  * Versioning Control Files (.git, .gitignore, .svn; I am using git's
> submodules feature with one particular directory, but certainly do not
> want to deploy a whole .git repository with my WAR)
>  * Photoshop PSD files, of which most are contained within a
> assets/src-images folder.
>
> This issue is somewhat similar to the issue raised here, over 2 years ago:
> http://www.mail-archive.com/[email protected]/msg41790.html
> http://markmail.org/message/qeoprewtxngxlaom
>
> I have tried two configurations:
>
> [1]
>
>            <plugin>
>                <artifactId>maven-war-plugin</artifactId>
>                <version>2.0.2</version>
>                <configuration>
>
> <dependentWarExcludes>**/jdbc.properties,**/hibernate.cfg.xml,**/sql-map-config.xml,**/web.xml,WEB-INF/classes/META-INF/**</dependentWarExcludes>
>
>                            <excludes>
>                                <exclude>**/.git</exclude>
>                                <exclude>**/.gitignore</exclude>
>                                <exclude>**/*.psd</exclude>
>                                <exclude>assets/src-images/**</exclude>
>                            </excludes>
>                </configuration>
>            </plugin>
>
>
> [2]
>
>            <plugin>
>                <artifactId>maven-war-plugin</artifactId>
>                <version>2.0.2</version>
>                <configuration>
>
> <dependentWarExcludes>**/jdbc.properties,**/hibernate.cfg.xml,**/sql-map-config.xml,**/web.xml,WEB-INF/classes/META-INF/**</dependentWarExcludes>
>
>                    <webResources>
>
>                        <resource>
>                            <!--<directory>resource2</directory>-->
>                            <excludes>
>                                <exclude>**/.git</exclude>
>                                <exclude>**/.gitignore</exclude>
>                                <exclude>**/*.psd</exclude>
>                                <exclude>assets/src-images/**</exclude>
>                            </excludes>
>                       </resource>
>                    </webResources>
>                </configuration>
>            </plugin>
>
> [1] doesn't seem to be working. the excludes are simply ignored.
> [2] throws a NullPointerException if the directory element is omitted.
> This appears to contradict the fourth example in the documentation
> (under Includes/Excludes here:
> http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html)
> which shows the directory element may be omitted.
>
> Thanks for any advice you can give.
>
> Alex Coles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to