maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <>
Subject Re: maven-jar-plugin(put the configuration file to the WEB-INFO/classes rather than WEB-INFO/lib/xx.jar.
Date Fri, 05 Mar 2010 14:18:29 GMT
Generally, read files from the classpath.
So, remove the form your server project. For any unit
tests you can put a under src/test/resources (will be on
the test class path). The add the 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 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 so that it
ends up on the class path.


On Fri, Mar 5, 2010 at 14:48, maven apache <> 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(, 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, however
> after I run "mvn clean install" , I found that the server.jar do not
> contain
> the 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?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message