On Fri, Jul 10, 2009 at 1:54 PM, Vincent Fumo<neo...@gmail.com> wrote: > I'm converting an old project to maven and I have a question re: spring. > This project has about 20 spring config files and it reads them all in on > startup and uses the In addition I have 4 properties files > (local/dev/qa/prod) that I'd like to use to inject/filter/substitute values > into them depending on the build. Lastly I am using the eclipse plugin to > generate an eclipse project. > What I need to know is the following : > > 1) where should I put the spring files? I am considering > src/main/resources/spring
If you load them from the classpath, put them in src/main/resources. By default everything in this directory will end up in target/classes (if your project uses a packaging of "jar") > 2) how should I best filter the props files? Should I use maven for this > (using profiles in some way), or should I load the files in the app and use > the spring properties configurator? I don't think anyone on this list is qualified to make this architectural decision for you. But, if you wanted to use Maven Resource filtering, you could. You would have a single properties file: whatever.properties which would contain references to arbitrary properties such as "${whatever.jdbc.url}", then you would use profiles and configure resource filtering on this properties file. > 3) what is the best way to use the eclipse plugin to generate a project > where I can run the app and it can see the newly filtered spring files > (instead of the src ones)? > m2eclipse is going to automatically call "process-resources resources:testResources" every time you change a resource and copy the result to target/classes. You can control the profile via your project's Maven preferences in m2eclipse. > Can anyone help me out? I'd certainly give more info if needed. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org