Generally, read files from the classpath. So, remove the config.properties form your server project. For any unit tests you can put a config.properties under src/test/resources (will be on the test class path). The add the config.properties to you war project so that it will be added to the webapp's class path. And there you go... Or, you might even want to keep the config.properties outside the war if you want to have different configuration for each environment. Your app server will likely have some folder where you can add config.properties so that it ends up on the class path.
/Anders On Fri, Mar 5, 2010 at 14:48, maven apache <apachemav...@gmail.com> wrote: > HI: > I have two module Server(type of jar) and Web(type of war). > The Web module need Server, however in the Server module I need to read > something from a config file(config.properties), this file is put under the > Server module, and I do not want to this file packaged to the server.jar > file, I want to it under the Web/WEB-INFO/classes . > So I use the maven-jar-plugin to exclude the config.properties, however > after I run "mvn clean install" , I found that the server.jar do not > contain > the config.properties( this is just I expected), however the file do not > exist under the Web/WEB-INFO/classes. > So I want to know if there are any ways to implement my requirement? >