ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28398] New: - Add "file" option to PropertyFile's inner "entry" task
Date Wed, 14 Apr 2004 22:55:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28398>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28398

Add "file" option to PropertyFile's inner "entry" task

           Summary: Add "file" option to PropertyFile's inner "entry" task
           Product: Ant
           Version: 1.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: wms@igoweb.org


The <propertyfile ...> task lets you manipulate a property file from within an
ant script. Very useful! But all entries you want to add or modify must be in
the ant task itself. I have a property file, and based on which type of build, I
want to change several of them, but having the changes in smaller property files
is more convienient than putting them all right in the ant task. For example, I
might have "config.properties", with a lot of entries, and
"config-unitTest.properties", which has about a dozen entries that must be
changed from the main file when doing unit testing.

To let this happen, I added code to the "entry" task, letting you specify a file
name. If you do, all properties from the file given are pulled into the file
being modified, so for my example above the build file would have:

<propertyfile file="config.properties">
  <entry file="config-unitTest.properties"/>
</propertyfile>

I find this very useful, and since I think other people might also, I put
together a diff to make this work.

I tried to keep the coding style as close to the original in my diff, and
changed the documentation at the top to describe my changes. I couldn't tell for
sure if the standard ant docs are built from the javadoc or not, if I need to
make changes somewhere else to get these changes put into the docs, please just
say so.

Meanwhile, I'll attach the diff file right after submitting this bug. The
changes aren't very big.

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


Mime
View raw message