K
kevin cline
I've come across the following Ant task:
<!-- complicated way to set the oracle.app.username from the
version.platform property
by writing a property file, then hacking it with replaceregexp
and then rereading it.
TODO: find simpler way to do this
-->
<target name="create-oracle-username" unless="oracle.app.username">
<mkdir dir="${basedir}/build"/>
<delete file="${oracle.app.username.file}"/>
<propertyfile file="${oracle.app.username.file}">
<entry key="changeme" value="user_${version.platform}"/>
</propertyfile>
<replaceregexp file="${oracle.app.username.file}" match="\."
replace="_" flags="g"/>
<replaceregexp file="${oracle.app.username.file}" match="changeme"
replace="oracle.app.username"/>
<property file="${oracle.app.username.file}"/>
<delete file="${oracle.app.username.file}"/>
Is there some simpler way of setting the oracle.app.username property
from the value of version.platform? This would be one line in a
makefile.
<!-- complicated way to set the oracle.app.username from the
version.platform property
by writing a property file, then hacking it with replaceregexp
and then rereading it.
TODO: find simpler way to do this
-->
<target name="create-oracle-username" unless="oracle.app.username">
<mkdir dir="${basedir}/build"/>
<delete file="${oracle.app.username.file}"/>
<propertyfile file="${oracle.app.username.file}">
<entry key="changeme" value="user_${version.platform}"/>
</propertyfile>
<replaceregexp file="${oracle.app.username.file}" match="\."
replace="_" flags="g"/>
<replaceregexp file="${oracle.app.username.file}" match="changeme"
replace="oracle.app.username"/>
<property file="${oracle.app.username.file}"/>
<delete file="${oracle.app.username.file}"/>
Is there some simpler way of setting the oracle.app.username property
from the value of version.platform? This would be one line in a
makefile.