aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes How to edit xml or propeties file manually by the use of ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to edit xml or propeties file manually by the use of ant" Watch "How to edit xml or propeties file manually by the use of ant" New topic
Author

How to edit xml or propeties file manually by the use of ant

Sujeet Kumar Singh
Greenhorn

Joined: Apr 13, 2011
Posts: 1
Dear All,

How to edit xml or propeties file manually by the use of ant.

Please share with examples and steps for the same.

Thanks in advance,

Sujeet Kumar Singh
Phani Raju
Greenhorn

Joined: Aug 03, 2007
Posts: 19
Take a look at the below tasks available in Ant:

  • PropertyFile
  • Replace
  • ReplaceRegExp


  • Post back if you get any issues while using these.
    Peter Johnson
    author
    Bartender

    Joined: May 14, 2008
    Posts: 5772
        
        7

    Here is what I do. I create my xml and properties files with embedded EL-style property references, such as ${something}. Then in my Ant script I make sure that I define the "something" property, and I use the copy task with the filterchain/expandproperties setting. Also check into the other filterchain options.


    JBoss In Action
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: How to edit xml or propeties file manually by the use of ant
     
    Similar Threads
    Deploying With Ant Using Websphere3.5
    How to set session id manually ?
    using ANT to update an XML file (newbie question)
    Find web application root path?
    Glassfish: specify thread pool for a webapp