<var name="x" value="" unset="true"/> [3]).<property name="xmlFileProperty1" value="abc" />
<property name="xmlFileProperty1" value="def" /><property file="someFile.properties" />) and that file included that same property name. Ant keeps the property file’s value if the file is loaded first (as long as no “user”/command line properties have already set it).<antcall target="someTarget">
<param name="antcallProp1" value="abc" />
<param name="antcallProp1" value="def" />
</antcall>
Similar seemingly out-of-order property setting shows up with the “ant” task [5], the task that invokes another Ant build file:
<ant antfile="someOtherXmlFile">
<property name="antTaskProp1" value="abc" />
<property name="antTaskProp1" value="def" />
</ant>
propertyFileProp1=abc
propertyFileProp1=defant -DcmdLineProp1=abc -DcmdLineProp1=def-v -Djavac.debug=off -lib ../some/path” setting and used javac.debug to control the “debug” attribute of the “javac” task [12][13] — if that, then these two commands would produce opposite results (only the second command produces class files with debug metadata:ant -Djavac.debug=true ${ANT_ARGS_NORMAL}
ant ${ANT_ARGS_NORMAL} -Djavac.debug=true
And that’s what bit me today.
And that’s what inspired this investigation into the true nature of Ant property setting order.
What do you do when your network is too small to need its own name server? Perhaps a firewall limits your access to name servers except the company’s few approved ones.
What do you do? Settle for IP addresses? Stuck memorizing 192.168…. octets?
Or have you produced an elaborate solution using the /etc/hosts table and Subversion or CVS?
You could check the ifconfig command upon reboot to see if your IP address has changed from what you expect it to be (from /etc/hosts). Then update the hosts table and commit it to a common subversion repository so everyone who updates can find you!
Possibilities….
So what do you do?
Especially when it comes to naming computer files, it’s important to pick a name that will allow you to clearly tell which version is the latest: “Flannery Family Taxes 2010.pdf” is a good name for the final copy but “Flannery Family Taxes 2010-d20110605.pdf” tells me exactly when I produced that version. I will pay more attention to that one than “Flannery Family Taxes 2010-d20110415.pdf”.
Christa hates my habit of saving multiple versions of a file. “Just keep the latest version. Why keep all these in-between files?”
I try to explain how much work I have lost by making a change to an important document only to erase hours of work while saving it. If I have a new file name every hour or every save, I can always find the second-latest version and minimize these kinds of “Select All, Delete, Save” disasters.
Notice the use of ISO 8601 dates to allow for easy sorting: I can sort by modified date or created date but even if I sort by name, “20110605” sorts after “20110415”, as it should.
But there is no ISO 8601 equivalent for relative terms like “before” and “after”. In fact, terms like these consistently sort in the wrong order:
- “post-” sorts before “pre-“
- “new” before “old” and “original” (“orig”)
- “after” precedes “before”
- “finish” precedes “start”
The only pairs I can conjure for correct sorting is “beginning” vs. “end” and “earlier” vs. “later”. Try mixing up terms like using “before” or “backup” with “new” instead of “after”. Pairing “old” with “post-” allows you to specify what changed in the file name: “post-accountant_review” or “post-found_lost_paperwork”. (“Post” is a near archaism, however: It sounds like I’m referring to the mail.)
What a funny problem of our language.
Alternatives to relative terms:
- Time-stamps, where we started. But “d20110606” must wait until one day after “d20110605” unless you start adding time details: “d20110605T1130” or “d20110605T113015” to include seconds (more than one change per minute?) — or “d20110605T1130Z” to clarify that thee timezone is UTC.
- Note that ISO 8601 often uses dashes to separate parts of the date and colons to separate parts of the time. Colons are no good for file names and dashes seem unnecessary characters as long as days and months use leading zeros (“20110605” instead of ambiguous “201165”).
- Another workaround involves abandoning words and prefixes of relative chronology in favor of absolute versions: “version1” vs. “version2” or “ver1” or “v1”. If you are distinguishing more than just versions, perhaps “alternate2” or “alt2”:
- “
Flannery Family Taxes 2010-d20110605-alt2.pdf” vs. “Flannery Family Taxes 2010-d20110605-alt1.pdf“ - But by the time you are arbitrarily enumerating alternate versions, why not just name what alternates:
- “
Flannery Family Taxes 2010-d20110605-no_deductions.pdf” vs. “Flannery Family Taxes 2010-d20110605-donations_deducted.pdf“
When a man lies, he murders some part of the world.
These are the pale deaths which men miscall their lives.
All this I cannot bear to witness any longer.
Cannot the kingdom of salvation take me home?
(Recited/typed from memory with respect to Cliff Burton and Paul Gerhardt.)
