You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by AK <va...@gmail.com> on 2006/07/17 13:51:08 UTC

how to copy resources while building war

Hi, I have a multimodule project, all modules' config properties are  
stored within each module's directory. For example, kernel module has its  
props in kernel/config folder.
I have a web module, which uses all other modules, and all their  
properties must be stored within web-inf folder as this web module  
references them. If I make kernel/config a resource folder, config will be  
put inside kernel.jar, and won't be available for web app. So I have to  
copy the configs manually, which is annoying.
How can I make maven copy the needed resources while creating war file  
(while compiling web app sources)?

-- 
.:Regards, AK:.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: how to copy resources while building war

Posted by dcabasson <de...@insee.fr>.
Hi,

Why is having your property files inside the jar annoying? You can easily
access them, and if they relates only to a single module - which seems to be
the cas, since they are stored within each of your modules - it's quite
consistent to get them in this module's jar.
And if configuration doesn't relate to a single module, storing them inside
your webapp module would sound more consistent.

So maybe if you could precise why you want these property files within each
of your modules, and then stored in your WEB-INF folder, we could find
another solution...

Denis.

AK-8 wrote:
> 
> Hi, I have a multimodule project, all modules' config properties are  
> stored within each module's directory. For example, kernel module has its  
> props in kernel/config folder.
> I have a web module, which uses all other modules, and all their  
> properties must be stored within web-inf folder as this web module  
> references them. If I make kernel/config a resource folder, config will be  
> put inside kernel.jar, and won't be available for web app. So I have to  
> copy the configs manually, which is annoying.
> 

-- 
View this message in context: http://www.nabble.com/how-to-copy-resources-while-building-war-tf1954353.html#a5360138
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: how to copy resources while building war

Posted by Ivo Limmen <iv...@gmail.com>.
I think you should take a look at webResources of the WAR
plugin<http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html>
.

On 7/17/06, AK <va...@gmail.com> wrote:
>
> Hi, I have a multimodule project, all modules' config properties are
> stored within each module's directory. For example, kernel module has its
> props in kernel/config folder.
> I have a web module, which uses all other modules, and all their
> properties must be stored within web-inf folder as this web module
> references them. If I make kernel/config a resource folder, config will be
> put inside kernel.jar, and won't be available for web app. So I have to
> copy the configs manually, which is annoying.
> How can I make maven copy the needed resources while creating war file
> (while compiling web app sources)?
>
> --
> .:Regards, AK:.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: how to copy resources while building war

Posted by Ma...@ubs.com.
Hi,

I had a similar problem and solved it by packaging the submodule
resources as a war file too. Next, let the war plugin overlay that war
with the top-level war file.
In my case the "submodule" is included by dependency and I had to add a
<type>war</type> to the dependency tag to make that work. I'm not shure
about how to do the overlaying thing with a real module.

Happy compiling
Max


-----Original Message-----
From: AK [mailto:vangop@gmail.com] 
Sent: 17 July 2006 12:51
To: users@maven.apache.org
Subject: how to copy resources while building war

Hi, I have a multimodule project, all modules' config properties are
stored within each module's directory. For example, kernel module has
its props in kernel/config folder.
I have a web module, which uses all other modules, and all their
properties must be stored within web-inf folder as this web module
references them. If I make kernel/config a resource folder, config will
be put inside kernel.jar, and won't be available for web app. So I have
to copy the configs manually, which is annoying.
How can I make maven copy the needed resources while creating war file
(while compiling web app sources)?

--
.:Regards, AK:.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org