You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Adrian Beech <a....@bigpond.net.au> on 2004/01/18 12:20:42 UTC

Including the value of properties defined in a build.xml in source files such as web.xml?

G'day,

I was wondering if it is possible to include the value of properties
defined in the build.xml file in source files such as web.xml?  I have
three staging environments which have platform specific attributes such
as JDBC connections strings, application headers, etc.  These values are
defined in the web.xml file and it would make life a whole lot easier if
they could be defined as properties in the build.xml file and
substituted in the right places within the source files when the
appropriate target is specified.

One of the annoying things I need to do each time I progress an
application from one environment to another is to remember to edit the
web.xml file so that the resulting package has the appropriate
application/environment attributes.  Things would be a hole lot nicer if
I could simply type "ant dev", "ant test" or "ant prod" and have
everything set up accordingly.

I would appreciate any help in this matter.

AB



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Sorting List Posts was:Re: Attention Moderator

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Mark McKay wrote:
> I recently subscribed to this mailing list, and was wondering if it 
> would be possible to have the mailer prepend the string "[Ant]" to every 
> post sent out?  I subscribe to several mailing lists, and am finding it 
> difficult to keep the Ant posts sorted from the others.

All Apache lists have a bunch of headers which uniquely identify the
list, I use List-Post for filtering. Since you run Mozilla, you can
do the same; just use "Customize" to get this non-standard header
in the filter.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Attention Moderator

Posted by Mark McKay <ma...@kitfox.com>.
Conor MacNeill wrote:

>On Mon, 19 Jan 2004 08:47 am, Mark McKay wrote:
>  
>
>>Hi,
>>
>>I recently subscribed to this mailing list, and was wondering if it
>>would be possible to have the mailer prepend the string "[Ant]" to every
>>post sent out?  I subscribe to several mailing lists, and am finding it
>>difficult to keep the Ant posts sorted from the others.
>>
>>    
>>
>
>No, it is the list policy not to modify subject strings. There are a number of 
>ways of filtering messages from this list into separate folders, which should 
>be supported by most mail clients. In particular you may use the List-Post or 
>List-Id headers, which show the message coming from this mailing list.
>
>List-Post: <ma...@ant.apache.org>
>List-Id: "Ant Users List" <user.ant.apache.org>
>
>Conor
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>  
>
What's a list post header?  I've read through the mozilla docs (and 
figured out how to put messages into a seperate folder), but not come 
across a way to rewrite the subject.  Would you be able to tell me how 
to enable this?

Mark McKay


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Attention Moderator

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
On Mon, 19 Jan 2004 08:47 am, Mark McKay wrote:
> Hi,
>
> I recently subscribed to this mailing list, and was wondering if it
> would be possible to have the mailer prepend the string "[Ant]" to every
> post sent out?  I subscribe to several mailing lists, and am finding it
> difficult to keep the Ant posts sorted from the others.
>

No, it is the list policy not to modify subject strings. There are a number of 
ways of filtering messages from this list into separate folders, which should 
be supported by most mail clients. In particular you may use the List-Post or 
List-Id headers, which show the message coming from this mailing list.

List-Post: <ma...@ant.apache.org>
List-Id: "Ant Users List" <user.ant.apache.org>

Conor


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Attention Moderator

Posted by Mark McKay <ma...@kitfox.com>.
Hi,

I recently subscribed to this mailing list, and was wondering if it 
would be possible to have the mailer prepend the string "[Ant]" to every 
post sent out?  I subscribe to several mailing lists, and am finding it 
difficult to keep the Ant posts sorted from the others.

Thanks.

Mark McKay


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Including the value of properties defined in a build.xml in source files such as web.xml?

Posted by Claas Thiele <ct...@ct42.de>.
Adrian Beech wrote:
> G'day,
> 
> I was wondering if it is possible to include the value of properties
> defined in the build.xml file in source files such as web.xml?  I have
> three staging environments which have platform specific attributes such
> as JDBC connections strings, application headers, etc.  These values are
> defined in the web.xml file and it would make life a whole lot easier if
> they could be defined as properties in the build.xml file and
> substituted in the right places within the source files when the
> appropriate target is specified.
> 
> One of the annoying things I need to do each time I progress an
> application from one environment to another is to remember to edit the
> web.xml file so that the resulting package has the appropriate
> application/environment attributes.  Things would be a hole lot nicer if
> I could simply type "ant dev", "ant test" or "ant prod" and have
> everything set up accordingly.
> 
> I would appreciate any help in this matter.
> 
> AB
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
Have a look at:
- Replace task under 'Core Tasks'
- FilterSet under 'Concepts'
- ReplaceRegExp under 'Optional Tasks' in the manual.

For XML files XSL can be a solution using the xslt task.

The cocoon group has a task named XPatch in work for modifying xml 
config files. Maybe it can be used for other files than *.xconf cocoon 
files.
Have a look at: http://wiki.cocoondev.org/Wiki.jsp?page=XPatchTaskUsage

Yes, more than one possibility...


Claas
-- 
____________________________________________________________________
Dipl.-Inf. Claas Thiele          	EMail: cthiele@ct42.de
Konradstr. 58                    	Web:   http://ct42.de
04315 Leipzig                    	Tel.: +49 (0)341 68 70 92 29
GERMANY                          	Fax   +49 (0)341 68 70 92 30



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org