ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: help with uptodate and hibernate doclet
Date Tue, 20 Nov 2007 23:17:27 GMT
The problem with uptodate is that it can only have a single "target"
file to check against. Look at the AntContrib's <outofdate> task.

The <outofdate> task can take more than a single target, and (as an
added bonus), it can define the tasks to run if an outofdate condition
is detected. No more setting a property then having a task check that
property before it executes. Unless, you want to do that. The
<outofdate> task can also set a property if an <outofdate> condition
is detected.

See <http://ant-contrib.sourceforge.net/tasks/tasks/outofdate.html>.

On Nov 20, 2007 5:35 AM, Dimitris Mouchritsas <dmouch@gmail.com> wrote:
> Hi folks, I'm trying to create a condition task so as not to run a
> hibernatedoclet target.
> The problem is the target does not produce .hbm.xml files for all the
> classes. So
> for example if we have 3 classes in the src dir say, User.java, Account.java,
> Login.java
> the resulting files in the build dir might look like:
> User.class
> User.hbm.xml
> Account.class
> Account.hbm.xml
> Login.class
>
> So not all classes have a hibernate configuration file. My problem is how
> can I use uptodate
> to check these? I've tried this:
> <uptodate>
>   <srcfiles dir="${src.dir}">
>     <include name="**/mypackage/domain/**/*.java" />
>   </srcfiles>
>
>   <chainedmapper>
>     <globmapper from="*" to="${domain.build.dir}" />
>     <compositemapper>
>       <globmapper from="*.java" to="*.class" />
>       <globmapper from=".java" to="*.hbm.xml" />
>     </compositemapper>
>   </chainedmapper>
> </uptodate>
>
> But I guess this mapper needs every class to have a corresponding .hbm.xml
>
> --
> Dimitris Mouchritsas
> Computer Services
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message