Torque
  1. Torque
  2. TORQUE-101

Torques Maven2 Plugin is lacking IDBroker-Features (which the maven1 version provided)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3-RC1, 3.3-RC2
    • Fix Version/s: 3.3-RC3
    • Component/s: Maven 2 Plugin
    • Labels:
      None
    • Environment:

      Description

      As already discussed with Thomas Fischer on the list torque-user@db.apache.org it seems that the Maven2 plugin for Torque is lacking the feature of creating the init-statements for the IDBroker-Table.

      I am currently porting an application to build with maven2. Everything seems to be fine except the creation of the IDBrokers ID_TABLE:

      Torques maven1 plugin provided a goal named torque:id-table-init-sql which created .sql files for the initialisation of the IDBroker-Table. The content was like that:

      insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES (5101, 'poll', 1000, 10); [...]

      These files dont get generated with the Maven2 version of the plugin. The only config-option which could have to do sth with this is idTableXmlFile of the sql-Mojo. Thomas sais this is needed by the underlaying ant-task but he also does not know where it is for exactly.

      Please have a look at the mailinglist for more details: http://mail-archives.apache.org/mod_mbox/db-torque-user/200709.mbox/browser

      Would it be possible to add this missing feature ( porting the maven1 plugins goal torque:id-table-init-sql ) soon? Then i could easily port my applications build-process to maven2.

      Thanks in advance,

      Marc

      PS:

      My config is like this (i tried several versions):

      plugin>
      <groupId>org.apache.db.torque</groupId>
      <artifactId>torque-maven-plugin</artifactId>
      <version>3.3-RC2</version>
      <configuration>
      <url>jdbc:mysql://localhost/mysoftware</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.mycompany.mysoftware</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>

        Activity

        Thomas Fox made changes -
        Affects Version/s 3.3-RC2 [ 12312370 ]
        Affects Version/s 3.3-RC1 [ 12312227 ]
        Thomas Fox made changes -
        Field Original Value New Value
        Fix Version/s 3.3-RC3 [ 12312398 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Marc Kannegiesser created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Marc Kannegiesser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development