db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Kannegiesser" <macs_mailingli...@gmx.de>
Subject Torque Maven2 Plugin and idBroker
Date Fri, 14 Sep 2007 11:36:41 GMT
Hi Everyone. 

I am currently porting the built-process of an application from Maven1 to Maven 2. 

We used the maven-torque-plugin and - of course - we are planning to use the maven2 MOJO-Based
version now. This works quite well already but I'm currently having some problems with the
IDBroker feature. 
For maven1 there was a goal named torque:id-table-init-sql to init the ID-Broker table. This
goal is missing in the maven2 version and I am wondering how to realize that the corresponding
table gets created correctly.

The only thing I could find was the config-option of the torque:sql goal named idTableXmlFile
which I alrady set. 

But this seems to be ignored and I am wondering if i need any additional (undocumented) parameters
or even an additional plugin?

My configuration in the pom.xml file:

<plugin>
  <groupId>org.apache.db.torque</groupId>
  <artifactId>torque-maven-plugin</artifactId>
  <version>3.3-RC2</version>
  <configuration>
    <url>jdbc:mysql://localhost/minos</url>
    <reportFile>report.${project.artifact.artifactId}.sql.generation</reportFi  
                  
    <runOnlyOnSchemaChange>false</runOnlyOnSchemaChange>
    <targetDatabase>mysql</targetDatabase>
    <schemaDir>${basedir}/src/torque-schemas</schemaDir>
    <templatePath>${basedir}/src/torque-templates</templatePath>
    <driver>org.gjt.mm.mysql.Driver</driver>
    <user>root</user>
    <password></password>
    <schemaIncludes>*schema.xml</schemaIncludes>
    <schemaExcludes>id-table-schema.xml</schemaExcludes>
    <targetPackage>com.synyx.minos.om</targetPackage>
    <idTableXmlFile>id-table-schema.xml</idTableXmlFile>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>3.1.12</version>
      <type>jar</type>
    </dependency>
  </dependencies>
  <executions>
    <execution>
      <id>Creating .sql files</id>
      <phase>process-resources</phase>
      <goals>
         <goal>sql</goal>
      </goals>
    </execution>
    <execution>
      <id>OM Goal (Generating Classes, Beans, ...)</id>
      <phase>process-resources</phase>
      <goals>
        <goal>om</goal>
      </goals>
      <configuration>
        <enableJava5Features>true</enableJava5Features>
        <complexObjectModel>true</complexObjectModel>
        <generateBeans>true</generateBeans>
        <beanSuffix>Bean</beanSuffix>
      </configuration>
    </execution>
    <execution>
      <id>Fire sql to the database!!!</id>
      <phase>process-resources</phase>
      <goals>
         <goal>sqlExec</goal>
      </goals>
    </execution>
  </executions>
</plugin>

With the maven1 plugin in the sql goal files like table-idbroker.sql were generated and executed
during the insert-sql goal. This seems not to be happening with the maven2 plugin. 

Hopefully anybody can help me and tell me what I forgot ;)

Thanks in advance, 


Marc

---------------------------------------------------------------------
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