This should help: http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html
And over here: http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html (Note the Examples links on the left side. They can provide you with specific pom.xml examples). I find that the reference at http://maven.apache.org/plugins/ is the best way to find information. I'm not too impress with any of the books I've seen. Most talk about how to setup a pom.xml for a specific type of application, but not about exactly how everything works, or where you can find more information. You can define command line properties to define exactly which directory you want: $ mvn -Dconfig-type=foo package <build> <resources> <resource> <directory>src/main/resources</directory> </resource> <resource> <directory>src/main/${config-type}-resources</directory> </resource> </resources> </build> If you use the above examples, you'll have to move those two directories to where you really want those the "mySpringBean.xml" file to be located when copied. For example, if they go into the META-INF directory, you'll need to have the two files in: src/main/foo-resources/META-INF/mySpringBean.xml and src/main/bar-resources/META-INF/mySpringBean.xml On Tue, Jun 23, 2009 at 3:00 PM, Robert Glover<robertglove...@yahoo.com> wrote: > > I have read chapter 13 of "Maven: The Definitive Guide" and did not find my > question answered there. > > Here is what I need to do. I have two subdirectories as follows: > > src/main/resources/foo > src/main/resources/bar > > I have the same file in each of those two directories: > > src/main/resources/foo/mySpringBean.xml > src/main/recourse/bar/mySpringBean.xml > > What I need to do is specify on the command line (or in a Profile or in > settings.xml) which of those two directories should have it's contents copied > to target/classes. The other directory should not have its contents copied > into target/classes. > > Thank you in advance! (hope hope). > > Robert > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- David Weintraub qazw...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org