db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shane Beasley <sbeas...@acm.org>
Subject tip: maven-torque-plugin and the maven (1.x) console
Date Tue, 12 Dec 2006 16:12:14 GMT
I like to use the maven (1.x) console. However, I was noticing that the 
Torque plugin really didn't like it when I ran the `clean` goal or 
otherwise blew away the generated OM files after they'd already been 
built. To get it to rebuild, I had to exit and re-enter the console.

Further investigation suggested that the torque:om and torque:sql goals 
rely upon two properties to determine whether they should run. 
Unfortunately, properties are immutable once they are set 
(http://ant.apache.org/manual/CoreTasks/property.html). As a result, 
once these goals are run, they cannot be run again.

Fortunately, Jelly provides a `remove` task which fixes this problem 
nicely. In maven.xml:

<project xmlns:j="jelly:core" [...]>
    <preGoal name="torque:om-check">
        <j:remove var="torque.internal.om.uptodate" />
    </preGoal>
    <preGoal name="torque:sql-check">
        <j:remove var="torque.internal.sql.uptodate" />
    </preGoal>
    [...]

Just thought I'd share...

Shane

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


Mime
View raw message