ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Raible" <m...@raibledesigns.com>
Subject Copying file that is used as a properties file
Date Fri, 28 Feb 2003 06:56:00 GMT
I have the following code to pick up a database's properties (actually,
this is a renamed hibernate.properties file)

<!-- Properties for loading and creating database from Ant -->
<property file="${user.home}/.${ant.project.name}-database.properties"/>
<property file="${user.home}/.database.properties"/>
<property file="database.properties"/>

This works great, however, I need this file (whichever one it is) to be
copied to my classpath and renamed hibernate.properties:

        <copy
tofile="${webapp.target}/WEB-INF/classes/hibernate.properties" 
            file="database.properties" />

I don't want to override anyone's custom database.properties file in the
project's root (hence ${user.home} lookup).  Is it possible to determine
the file that was loaded for the <copy> task?

Thanks,

Matt



Mime
View raw message