You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Quinton McCombs <qm...@nequalsone.com> on 2003/01/21 17:59:14 UTC

Need help with Torque plugin

I am not sure if this should be on the Torque or maven list so I will
try here first....
 
Turbine is now using Torque generated OM objects for the scheduler
service.  I copied parts of the project.properties and maven.xml from
fulcrum to see how to use the Torque plugin.  I also installed the
torque plugin that is available in torque's cvs HEAD as of a few days
ago.
 
Now, I am having a small problem.  The value of torque.targetPackage is
not being passed to torque.  The value that is being used is
org.apache.torque.  My maven.xml file is below.
 
<project
  xmlns:j="jelly:core"
  xmlns:m="maven"
  xmlns:u="jelly:util"
  default="java:jar">
 
  <!-- Define a post goal for compile to copy intake.dtd into the
appropriate
       location for packaging in the jar file.  -->
 
  <postGoal name="java:compile">
 
    <copy
      file="${maven.src.dir}/dtd/intake.dtd"
 
todir="${maven.build.dest}/org/apache/turbine/services/intake/transform"
    />
 
  </postGoal>
 
  <preGoal name="java:compile">
 
    <!-- Setup where Torque generates the files to. -->
    <copy todir="target/src">
      <fileset dir="src/java"/>
    </copy>
 
    <!-- Now generate the scheduler service. -->
    <j:set var="torque.project" value="scheduler"/>
    <j:set var="torque.schema.om.includes"
value="scheduler-schema.xml"/>
    <j:set var="torque.targetPackage"
value="org.apache.turbine.services.schedule"/>
    <filter token="DATABASE_DEFAULT"
value="${scheduler.database.name}"/>
    <filter token="EXTRA_USER_COLUMNS"
value="${scheduler.extra.user.columns}"/>
    <copy
      file="scheduler-schema.xml"
      tofile="${torque.schema.dir}/scheduler-schema.xml"
      filtering="yes"/>
    <attainGoal name="torque:om"/>
 
  </preGoal>
 
</project>

 
As you can see, it should be using org.apache.turbine.services.schedule.
Am I doing something wrong?
 
As a work around, I can set
torque.targetPackage=org.apache.turbine.services.schedule in
project.properties and it works fine.