RE: [m2] Filtering web.xml?

2008-02-26 Thread Henri Gomez
I had similar problem with a webapp I developed few months ago, so I
used this war filtering feature to add build number and deploy time
and other informations to jsp files as comment tags filtered by
maven.

Could you tell us how you do that ?

It's really simple to changes web.xml contents with
variables/properties using ant task but I still wonder how to do it
with maven 2 and advices samples are more than welcome.

Thanks

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



Re: [m2] Filtering web.xml?

2008-02-04 Thread Insitu
Hello,
I had similar problem with a webapp I developed few months ago, so I
used this war filtering feature to add build number and deploy time and other
informations to jsp files as comment tags filtered by maven.

Regards,
-- 
Arnaud Bailly, PhD
OQube - Software Engineering
http://www.oqube.com


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



RE: [m2] Filtering web.xml?

2008-02-04 Thread Allen, Daniel
Wayne:

I thought having packagingwar/packaging in your pom.xml was a
shortcut to calling war:war, with Maven filling in the requried
parameters. If I'm wrong about that, what's the difference? Just more
elaborate customizability with war:war?

Also, the plugin documentation is a little sparse, so I'm not sure which
of these parameters will help me. I see that you can specify the
location of webXML, and I see that there's a filters parameter, but
Maven already knows where web.xml is, and puts it in the right spot by
default; it only gets confused and misplaces the file when I try to use
filters. Also, the documentation for Fitlers only says it's used in
interpolation of the pom.xml, whereas I need to filter web.xml.

Thanks,
~Dan Allen

PS: What's an overlay? That sounds potentially useful, but the
parameter Overlays is just explained as specifies overlays.

-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 6:36 PM
To: Maven Users List
Subject: Re: [m2] Filtering web.xml?

The war plugin has a configuration you can use for this webXml:
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

That should do it...

Wayne

On 2/1/08, Allen, Daniel [EMAIL PROTECTED] wrote:
 I'm building a web application (packaging WAR), and I need to run the
 web.xml file through a filter to set certain configutation values. I
 tried adding it to a resource tag, but that causes Maven to make a
 copy of it and put it in WEB-INF/classes subdirectory with all of the
 rest of the resources. I tried setting targetPath to WEB-INF, but
then
 Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of
the
 two. I expect that this is because the phase where the the resources
 tag is processed is before the phase where the WAR file (and thus the
 WEB-INF directory I wish to target) is created. I'm guessing the
 generate-sources and package phases, respectively?

 So, how can I get maven to filter web.xml, but still put it where it
 needs to go in the WAR structure?

 Thanks in advance,
 ~DVA

 --
 This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP).

 This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.



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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: [m2] Filtering web.xml?

2008-02-04 Thread Allen, Daniel
Nevermind about the overlays; I found a docs page on that.

-Original Message-
From: Allen, Daniel 
Sent: Monday, February 04, 2008 11:08 AM
To: Maven Users List
Subject: RE: [m2] Filtering web.xml?

Wayne:

I thought having packagingwar/packaging in your pom.xml was a
shortcut to calling war:war, with Maven filling in the requried
parameters. If I'm wrong about that, what's the difference? Just more
elaborate customizability with war:war?

Also, the plugin documentation is a little sparse, so I'm not sure which
of these parameters will help me. I see that you can specify the
location of webXML, and I see that there's a filters parameter, but
Maven already knows where web.xml is, and puts it in the right spot by
default; it only gets confused and misplaces the file when I try to use
filters. Also, the documentation for Fitlers only says it's used in
interpolation of the pom.xml, whereas I need to filter web.xml.

Thanks,
~Dan Allen

PS: What's an overlay? That sounds potentially useful, but the
parameter Overlays is just explained as specifies overlays.

-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 6:36 PM
To: Maven Users List
Subject: Re: [m2] Filtering web.xml?

The war plugin has a configuration you can use for this webXml:
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

That should do it...

Wayne

On 2/1/08, Allen, Daniel [EMAIL PROTECTED] wrote:
 I'm building a web application (packaging WAR), and I need to run the
 web.xml file through a filter to set certain configutation values. I
 tried adding it to a resource tag, but that causes Maven to make a
 copy of it and put it in WEB-INF/classes subdirectory with all of the
 rest of the resources. I tried setting targetPath to WEB-INF, but
then
 Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of
the
 two. I expect that this is because the phase where the the resources
 tag is processed is before the phase where the WAR file (and thus the
 WEB-INF directory I wish to target) is created. I'm guessing the
 generate-sources and package phases, respectively?

 So, how can I get maven to filter web.xml, but still put it where it
 needs to go in the WAR structure?

 Thanks in advance,
 ~DVA

 --
 This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP).

 This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.



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


-- 
This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.


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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission

RE: [m2] Filtering web.xml?

2008-02-04 Thread Allen, Daniel
Ok, finally found the right page of the plugin docs with the info I
needed. I do stand by my comment about the documentation, within the
limited scope of the parameters page... a lot of them are documented
like they're self-explanatory, but if you're not familiar with the
workings of the plugin, they're anything but. Even little touches like
having the overlays parameter's documentation link to the overlays
explanation page would be helpful. 

I don't suppose there's a wiki or something that the documents are
generated from that I could go to and add that, is there? I may not know
enough yet to seriously contribute to the documents, but I can manage
small chores like cross-referencing. ;)


Anyway, thanks for the link, Wayne. 
~Dan Allen

-Original Message-
From: Allen, Daniel 
Sent: Monday, February 04, 2008 11:58 AM
To: Maven Users List
Subject: RE: [m2] Filtering web.xml?

Nevermind about the overlays; I found a docs page on that.

-Original Message-
From: Allen, Daniel 
Sent: Monday, February 04, 2008 11:08 AM
To: Maven Users List
Subject: RE: [m2] Filtering web.xml?

Wayne:

I thought having packagingwar/packaging in your pom.xml was a
shortcut to calling war:war, with Maven filling in the requried
parameters. If I'm wrong about that, what's the difference? Just more
elaborate customizability with war:war?

Also, the plugin documentation is a little sparse, so I'm not sure which
of these parameters will help me. I see that you can specify the
location of webXML, and I see that there's a filters parameter, but
Maven already knows where web.xml is, and puts it in the right spot by
default; it only gets confused and misplaces the file when I try to use
filters. Also, the documentation for Fitlers only says it's used in
interpolation of the pom.xml, whereas I need to filter web.xml.

Thanks,
~Dan Allen

PS: What's an overlay? That sounds potentially useful, but the
parameter Overlays is just explained as specifies overlays.

-Original Message-
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 6:36 PM
To: Maven Users List
Subject: Re: [m2] Filtering web.xml?

The war plugin has a configuration you can use for this webXml:
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

That should do it...

Wayne

On 2/1/08, Allen, Daniel [EMAIL PROTECTED] wrote:
 I'm building a web application (packaging WAR), and I need to run the
 web.xml file through a filter to set certain configutation values. I
 tried adding it to a resource tag, but that causes Maven to make a
 copy of it and put it in WEB-INF/classes subdirectory with all of the
 rest of the resources. I tried setting targetPath to WEB-INF, but
then
 Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of
the
 two. I expect that this is because the phase where the the resources
 tag is processed is before the phase where the WAR file (and thus the
 WEB-INF directory I wish to target) is created. I'm guessing the
 generate-sources and package phases, respectively?

 So, how can I get maven to filter web.xml, but still put it where it
 needs to go in the WAR structure?

 Thanks in advance,
 ~DVA

 --
 This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP).

 This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.



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


-- 
This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise,
on the part of KBC FP

Re: [m2] Filtering web.xml?

2008-02-03 Thread James Carman
On 2/3/08, Insitu [EMAIL PROTECTED] wrote:
 Allen, Daniel [EMAIL PROTECTED] writes:

  I'm building a web application (packaging WAR), and I need to run the
  web.xml file through a filter to set certain configutation values. I
  tried adding it to a resource tag, but that causes Maven to make a
  copy of it and put it in WEB-INF/classes subdirectory with all of the
  rest of the resources. I tried setting targetPath to WEB-INF, but then
  Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of the
  two. I expect that this is because the phase where the the resources
  tag is processed is before the phase where the WAR file (and thus the
  WEB-INF directory I wish to target) is created. I'm guessing the
  generate-sources and package phases, respectively?
 

 Hello,
 The war plugin has configuration options for defining and filtering
 webResources. Check http://maven.apache.org/plugins/maven-war-plugin

When they said filtering I think they meant more like what Apache
Ant lets you do with filter sets (replace token values with
configuration values).

 HTH,
 --
 Arnaud Bailly, PhD
 OQube - Software Engineering
 http://www.oqube.com


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



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



Re: [m2] Filtering web.xml?

2008-02-03 Thread James Carman
On 2/3/08, James Carman [EMAIL PROTECTED] wrote:
 On 2/3/08, Insitu [EMAIL PROTECTED] wrote:
  Allen, Daniel [EMAIL PROTECTED] writes:
 
   I'm building a web application (packaging WAR), and I need to run the
   web.xml file through a filter to set certain configutation values. I
   tried adding it to a resource tag, but that causes Maven to make a
   copy of it and put it in WEB-INF/classes subdirectory with all of the
   rest of the resources. I tried setting targetPath to WEB-INF, but then
   Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of the
   two. I expect that this is because the phase where the the resources
   tag is processed is before the phase where the WAR file (and thus the
   WEB-INF directory I wish to target) is created. I'm guessing the
   generate-sources and package phases, respectively?
  
 
  Hello,
  The war plugin has configuration options for defining and filtering
  webResources. Check http://maven.apache.org/plugins/maven-war-plugin

 When they said filtering I think they meant more like what Apache
 Ant lets you do with filter sets (replace token values with
 configuration values).

Sorry, I hit send too quickly.  I actually use the antrun m2 plugin to
execute an Ant copy to achieve this.

 
  HTH,
  --
  Arnaud Bailly, PhD
  OQube - Software Engineering
  http://www.oqube.com
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: [m2] Filtering web.xml?

2008-02-03 Thread Insitu
Allen, Daniel [EMAIL PROTECTED] writes:

 I'm building a web application (packaging WAR), and I need to run the
 web.xml file through a filter to set certain configutation values. I
 tried adding it to a resource tag, but that causes Maven to make a
 copy of it and put it in WEB-INF/classes subdirectory with all of the
 rest of the resources. I tried setting targetPath to WEB-INF, but then
 Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of the
 two. I expect that this is because the phase where the the resources
 tag is processed is before the phase where the WAR file (and thus the
 WEB-INF directory I wish to target) is created. I'm guessing the
 generate-sources and package phases, respectively?


Hello,
The war plugin has configuration options for defining and filtering
webResources. Check http://maven.apache.org/plugins/maven-war-plugin

HTH,
-- 
Arnaud Bailly, PhD
OQube - Software Engineering
http://www.oqube.com


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



[m2] Filtering web.xml?

2008-02-01 Thread Allen, Daniel
I'm building a web application (packaging WAR), and I need to run the
web.xml file through a filter to set certain configutation values. I
tried adding it to a resource tag, but that causes Maven to make a
copy of it and put it in WEB-INF/classes subdirectory with all of the
rest of the resources. I tried setting targetPath to WEB-INF, but then
Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of the
two. I expect that this is because the phase where the the resources
tag is processed is before the phase where the WAR file (and thus the
WEB-INF directory I wish to target) is created. I'm guessing the
generate-sources and package phases, respectively?

So, how can I get maven to filter web.xml, but still put it where it
needs to go in the WAR structure?

Thanks in advance,
~DVA

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.



Re: [m2] Filtering web.xml?

2008-02-01 Thread Wayne Fay
The war plugin has a configuration you can use for this webXml:
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html

That should do it...

Wayne

On 2/1/08, Allen, Daniel [EMAIL PROTECTED] wrote:
 I'm building a web application (packaging WAR), and I need to run the
 web.xml file through a filter to set certain configutation values. I
 tried adding it to a resource tag, but that causes Maven to make a
 copy of it and put it in WEB-INF/classes subdirectory with all of the
 rest of the resources. I tried setting targetPath to WEB-INF, but then
 Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of the
 two. I expect that this is because the phase where the the resources
 tag is processed is before the phase where the WAR file (and thus the
 WEB-INF directory I wish to target) is created. I'm guessing the
 generate-sources and package phases, respectively?

 So, how can I get maven to filter web.xml, but still put it where it
 needs to go in the WAR structure?

 Thanks in advance,
 ~DVA

 --
 This message may contain confidential, proprietary, or legally privileged 
 information. No confidentiality or privilege is waived by any transmission to 
 an unintended recipient. If you are not an intended recipient, please notify 
 the sender and delete this message immediately. Any views expressed in this 
 message are those of the sender, not those of any entity within the KBC 
 Financial Products group of companies (together referred to as KBC FP).

 This message does not create any obligation, contractual or otherwise, on the 
 part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
 recommendation to buy or sell, any financial product. Any prices or other 
 values included in this message are indicative only, and do not necessarily 
 represent current market prices, prices at which KBC FP would enter into a 
 transaction, or prices at which similar transactions may be carried on KBC 
 FP's own books. The information contained in this message is provided as 
 is, without representations or warranties, express or implied, of any kind. 
 Past performance is not indicative of future returns.



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



Re: [m2] Filtering web.xml?

2008-02-01 Thread Olivier Lamy
Hi,

What you can try is to add your web.xml in resources with filtering to true.
And set webXml in the mojo to ${project.build.outputDirectory}/web.xml.

--
Olivier

2008/2/2, Allen, Daniel [EMAIL PROTECTED]:
 I'm building a web application (packaging WAR), and I need to run the
 web.xml file through a filter to set certain configutation values. I
 tried adding it to a resource tag, but that causes Maven to make a
 copy of it and put it in WEB-INF/classes subdirectory with all of the
 rest of the resources. I tried setting targetPath to WEB-INF, but then
 Maven creates WEB-INF/classes/WEB-INF, and puts it in the deeper of the
 two. I expect that this is because the phase where the the resources
 tag is processed is before the phase where the WAR file (and thus the
 WEB-INF directory I wish to target) is created. I'm guessing the
 generate-sources and package phases, respectively?

 So, how can I get maven to filter web.xml, but still put it where it
 needs to go in the WAR structure?

 Thanks in advance,
 ~DVA

 --
 This message may contain confidential, proprietary, or legally privileged 
 information. No confidentiality or privilege is waived by any transmission to 
 an unintended recipient. If you are not an intended recipient, please notify 
 the sender and delete this message immediately. Any views expressed in this 
 message are those of the sender, not those of any entity within the KBC 
 Financial Products group of companies (together referred to as KBC FP).

 This message does not create any obligation, contractual or otherwise, on the 
 part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
 recommendation to buy or sell, any financial product. Any prices or other 
 values included in this message are indicative only, and do not necessarily 
 represent current market prices, prices at which KBC FP would enter into a 
 transaction, or prices at which similar transactions may be carried on KBC 
 FP's own books. The information contained in this message is provided as 
 is, without representations or warranties, express or implied, of any kind. 
 Past performance is not indicative of future returns.



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