db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renu Gupta <renu.gu...@impetus.co.in>
Subject RE: maven 2 plugin
Date Fri, 20 Jun 2008 10:58:29 GMT

Its not working this way.............. :( I have tried it too.......

<!--   Adding torque plugin for database access -->
                   <plugin>
                  <groupId>org.apache.db.torque</groupId>
                  <artifactId>torque-maven-plugin</artifactId>
                  <configuration>
                        <targetDatabase>mysql</targetDatabase>
                        <targetPackage></targetPackage>
                        <driver>org.gjt.mm.mysql.Driver</driver>
                        <url>jdbc:mysql://localhost:3306/bookstore4</url>
                        <user>root</user>
                        <password>1234</password>
                  </configuration>

                  <executions>
                        <execution>
                          <phase>generate-sources</phase>
                          <goals>
                             <goal>om</goal>
                          <goal>documentation</goal>
                                   </goals>

                         <!--Configuration element for second database -->
                        <configuration>
                                <targetDatabase>mysql</targetDatabase>
                                <targetPackage></targetPackage>
                                <driver>org.gjt.mm.mysql.Driver</driver>
                                <url>jdbc:mysql://localhost:3306/bookstore5</url>
                                <user>root</user>
                                <password>1234</password>
                        </configuration>

                        </execution>
                  </executions>
                  <dependencies>
                        <dependency>
                          <artifactId>mysql-connector-java</artifactId>
                          <groupId>mysql</groupId>
                          <version>3.1.12</version>
                          <type>jar</type>
                        </dependency>
                  </dependencies>
                </plugin>
        <!--  End of torque plugin 2 for database access -->
Regards,
Renu

> But then thomas can u tell me then how the configuration of second
> database will be known? And how come tables will be generated for
> second database?
> Can u tell me how shud I mention then?????????????
>

Use the configuration element inside the execution element.
http://maven.apache.org/pom.html#Plugins

    Thomas

-----Original Message-----
From: Thomas Fischer [mailto:fischer@seitenbau.net]
Sent: Friday, June 20, 2008 12:59 PM
To: Apache Torque Developers List
Subject: RE: maven 2 plugin

As I understand it, one does not add the plugin more than once, but one
specifies more than one executions for the same plugin. Check the maven
documentation.

     Thomas

>         <!--   Adding torque plugin 2 for database access -->
>                    <plugin>
>                   <groupId>org.apache.db.torque</groupId>
>                   <artifactId>torque-maven-plugin</artifactId>
>                   <configuration>
>                         <targetDatabase>mysql</targetDatabase>
>                         <targetPackage></targetPackage>
>                         <driver>org.gjt.mm.mysql.Driver</driver>
>                         <url>jdbc:mysql://localhost:3306/bookstore</url>
>                         <user>root</user>
>                         <password>1234</password>
>                   </configuration>
>                   <executions>
>                         <execution>
>                           <phase>generate-sources</phase>
>                           <goals>
>                              <goal>om</goal>
>                           <goal>documentation</goal>
>                                    </goals>
>                         </execution>
>                   </executions>
>                   <dependencies>
>                         <dependency>
>                           <artifactId>mysql-connector-java</artifactId>
>                           <groupId>mysql</groupId>
>                           <version>3.1.12</version>
>                           <type>jar</type>
>                         </dependency>
>                   </dependencies>
>                 </plugin>
>         <!--  End of torque plugin 2 for database access -->
>
>
>         <!--   Adding torque plugin for database access -->
>                    <plugin>
>                   <groupId>org.apache.db.torque</groupId>
>                   <artifactId>torque-maven-plugin</artifactId>
>                   <configuration>
>                         <targetDatabase>mysql</targetDatabase>
>                         <targetPackage></targetPackage>
>                         <driver>org.gjt.mm.mysql.Driver</driver>
>
<url>jdbc:mysql://192.168.41.116:3306/bookstore2</url>
>                         <user>root</user>
>                         <password>root</password>
>                   </configuration>
>                   <executions>
>                         <execution>
>                           <phase>generate-sources</phase>
>                             <goals>
>                              <goal>om</goal>
>                           <goal>documentation</goal>
>                                    </goals>
>                         </execution>
>                   </executions>
>                   <dependencies>
>                         <dependency>
>                           <artifactId>mysql-connector-java</artifactId>
>                           <groupId>mysql</groupId>
>                           <version>3.1.12</version>
>                           <type>jar</type>
>                         </dependency>
>                   </dependencies>
>                 </plugin>
>         <!--  End of torque plugin for database access -->
>


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


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


Mime
View raw message