Hi,
An other solution is to use antrun-plugin (attached to phase
process-classes).
But this attachment is not very good (I like to have a phase executed
just before package process-package-resources), because all of this jobs
are made when I run junit tests.
For few resources, I don't need to do this for just a junit test. 
What do you need to do on the web.xml ?
Perso, I use xdoclet plugin to generate it and configue the war plugin :
<webXml>${basedir}/target/xdoclet/web.xml</webXml> 

- Olivier

-----Message d'origine-----
De : Laurent Berteau [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 6 janvier 2006 09:33
À : Maven Users List
Objet : Re: RE : [m2] war plugin and resources filtering


Hi,

Those solutions looks OK for any resources _except_ for web.xml Indeed I
seem to me that in the package phase the original web.xml file 
is copied in the target directory, overiding the one that has been 
previously filtered.

Anyway this leads me to wonder if I am going in the right direction (as 
I am a Maven newbie). May be the customization of the web app params 
depending on the target physical node it will be deployed, should not be

done in the war build lifecycle but in an assembly project.
Do you have some good practice advices about this ?

Thanks for your help,

-- 
Laurent

Olivier Lamy wrote:
> Hi,
> To add resources (struts, tiles and others).
> Two solutions :
> - made your own war plugin (look at a solution proposed
> http://jira.codehaus.org/browse/MNG-1683)
> - using something as :
> <build>
>   <directory>build</directory>
>   <outputDirectory>build/classes</outputDirectory>
>  
>   <resources>
>     <resource>
>       <targetPath>path to ${webappDirectory}/WEB-INF</targetPath>
>       <directory>src/main/resources/struts</directory>
>       <includes>
>         <include>**/*.xml</include>
>       </includes>
>       <filtering>true</filtering>
>     </resource>
> 
> I don't like it because all web resources are included when just made 
> mvn compile
> 
> 
> - Olivier
> 
> -----Message d'origine-----
> De : Laurent Berteau [mailto:[EMAIL PROTECTED]
> Envoyé : jeudi 5 janvier 2006 18:35
> À : Maven Users List
> Objet : Re: [m2] war plugin and resources filtering
> 
> 
> Hi,
> 
>  >I think this is related to http://jira.codehaus.org/browse/MNG-791
> 
> Is there a known workaround to filter web.xml ?
> 
> This issue is blocking me from using the war plugin.
> I presume I am not the only person in that situation. What kind of
> solutions are you people using ?
> 
> Best regards,
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail, any attachments and the information contained therein ("this 
message") are confidential and intended solely for the use of the addressee(s). 
If you have received this message in error please send it back to the sender 
and delete it. Unauthorized publication, use, dissemination or disclosure of 
this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations 
contenues dans ce message ( ci après "le message" ), sont confidentiels et 
destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. 
Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur 
et de le détruire. Toutes diffusion, publication, totale ou partielle ou 
divulgation sous quelque forme que se soit non expressément autorisées de ce 
message, sont interdites.
-------------------------------------------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to