[ http://jira.codehaus.org/browse/MWAR-12?page=comments#action_61018 ]
Scott Tavares commented on MWAR-12: ----------------------------------- Hi, I'm trying to test Brian's patch out but I'm getting an error: [INFO] Building Maven Webapp Archetype [INFO] task-segment: [package] [INFO] ---------------------------------------------------------------------------- [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] ---------------------------------------------------------------------------- [ERROR] FATAL ERROR [INFO] ---------------------------------------------------------------------------- [INFO] org/codehaus/plexus/util/FileUtils$FilterWrapper [INFO] ---------------------------------------------------------------------------- [INFO] Trace java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils$FilterWrapper at org.apache.maven.plugin.resources.ResourcesMojo.copyFile(ResourcesMojo.java:217) at org.apache.maven.plugin.resources.ResourcesMojo.copyResources(ResourcesMojo.java:174) at org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:91) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:432) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) At first I thought this may be from not having the dependency on plexus-utils set correctly but I confirmed that it is. Does any one have any suggections for me? here is the POM of the maven-resources-plugin: <project> <parent> <artifactId>maven-plugin-parent</artifactId> <groupId>org.apache.maven.plugins</groupId> <version>2.0</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>maven-resources-plugin</artifactId> <packaging>maven-plugin</packaging> <name>Maven Resources Plugin</name> <version>2.2-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-model</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> <version>1.2-SNAPSHOT</version> </dependency> </dependencies> </project> and the POM for the test project i'm trying to build: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-webapp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>Maven Webapp Archetype</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <finalName>my-webapp</finalName> <filters> <filter>src/main/filters/database.properties</filter> </filters> <resources> <resource implementation="org.apache.maven.model.Resource"> <filtering>true</filtering> <directory>src/main/webapp</directory> <includes> <include>*/.properties</include> <include>*/.xml</include> <include>*/.vm</include> </includes> </resource> <resource implementation="org.apache.maven.model.Resource"> <filtering>true</filtering> <directory>src/main/webapp</directory> <includes> <include>*/</include> </includes> <excludes> <exclude>*/.properties</exclude> <exclude>*/.xml</exclude> <exclude>*/.vm</exclude> </excludes> </resource> </resources> </build> </project> TIA -Scott- > Add resource filtering to war plugin > ------------------------------------ > > Key: MWAR-12 > URL: http://jira.codehaus.org/browse/MWAR-12 > Project: Maven 2.x War Plugin > Type: Improvement > Reporter: Mark Hobson > Assignee: Brett Porter > Attachments: AbstractWarMojo.patch, MWAR-12.patch, ResourcesMojo.patch, > test.zip > > Original Estimate: 15 minutes > Remaining: 15 minutes > > I'd like to patch the war plugin to perform resource filtering as per the > resources plugin. This is a trivial patch but would duplicate the following > code from the resources plugin: > PropertyUtils > ReflectionProperties > ResourcesMojo.copyFile(File, File) > These look like handy util methods that could be incorporated into > plexus-utils - what do the developers think? > Also not sure how resource filtering will be affected by MNG-788. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira