Thanks a lot, Thomas
there is m2 plugin for torque3.1.1 at
http://repo1.maven.org/maven2/torque/maven-torque-plugin/
after m2 downloading:
http://repo1.maven.org/maven2/torque/maven-torque-plugin/3.1.1/maven-tor
que-plugin-3.1.1.pom
and
http://repo1.maven.org/maven2/torque/maven-torque-plugin/3.1.1/maven-tor
que-plugin-3.1.1.jar to the local repository
it encountered a fatal error as
[ERROR] FATAL ERROR
[INFO]
---------------------------------------------------------------------
[INFO] The PluginDescriptor for the plugin Plugin
[torque:maven-torque-plugin] was not found.
[INFO]
---------------------------------------------------------------------
Even I upgraded to 3.3-RC2, the Error is the same.
Is there any instruction on how to build PluginDescriptor or sample
plugindescriptor? Maybe there is something wrong in the <build>
Below is part of the pom
************
<project>
......
<build>
<plugins>
<plugin>
<groupId>torque</groupId>
<artifactId>maven-torque-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<schemaDir>conf</schemaDir>
<xmlFile>nequalsone-schema.xml</xmlFile>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<id>om</id>
<goals>
<goal>om</goal>
<goal>sql</goal>
<goal>sqlExec</goal>
<goal>documentation</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<artifactId>torque-gen</artifactId>
<groupId>torque</groupId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>village</groupId>
<artifactId>village</artifactId>
<version>2.0-dev-20030825</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
......
</project>
********
>>2007/9/24, Thomas Fischer <[EMAIL PROTECTED]>:
>>a) There is no maven2 plugin for Torque 3.1.1. The current m2 plugin
uses
>>the 3.3.RCx generator. I'd not recommend using it with a 3.1.1
runtime.
>>Consider upgrading; otherwise consider building a m2 plugin yourself
which
>>uses the 3.1.1 generator.
>>b) I'm afraid there is no example in the website. In principle, you
only
>>have to insert the plugin in the bild/plugins section of the pom. In
the
>>test project we use the following snippet:
>>
>> <plugin>
>> <groupId>org.apache.torque</groupId>
>> <artifactId>torque-maven-plugin</artifactId>
>> <version>${project.version}</version>
>> <configuration>
>> <schemaDir>target/torque/test/schema</schemaDir>
>> <targetDatabase>${torque.targetDatabase}</targetDatabase>
>> <targetPackage>org.apache.torque.test</targetPackage>
>> <useManagers>${torque.useManagers}</useManagers>
>> <generateBeans>${torque.generateBeans}</generateBeans>
>> <runOnlyOnSchemaChange>false</runOnlyOnSchemaChange>
>> <driver>${torque.driver}</driver>
>> <url>${torque.database.url}</url>
>> <user>${torque.database.user}</user>
>> <password>${torque.database.password}</password>
>> <projectName>bookstore</projectName>
>> </configuration>
>> <executions>
>> <execution>
>> <phase>generate-sources</phase>
>> <id>om</id>
>> <goals>
>> <goal>om</goal>
>> <goal>sql</goal>
>> <goal>sqlExec</goal>
>> <goal>documentation</goal>
>> </goals>
>> </execution>
>> <execution>
>> <phase>test</phase>
>> <id>data</id>
>> <goals>
>> <goal>datadtd</goal>
>> <goal>datadump</goal>
>> <goal>datasql</goal>
>> </goals>
>> <configuration>
>>
<xmlFile>target/torque/test/schema/bookstore->>schema.xml</xmlFile>
>>
>>
<dataXmlFile>target/data/torque/bookstore-bookstore-all->>data.xml</data
XmlFile>
>>
>> <dataDtd>target/data/torque/bookstore-data.dtd</dataDtd>
>> </configuration>
>> </execution>
>> </executions>
>> <dependencies>
>> <dependency>
>> <artifactId>${torque.test.driver.artifactId}</artifactId>
>> <groupId>${torque.test.driver.groupId}</groupId>
>> <version>${torque.test.driver.version}</version>
>> </dependency>
>> </dependencies>
>> </plugin>
>>Probably you only need one execution. Also you need to fill the ${...}
>>variables with correct values (you can also omit some of these, not
all >>are
>>required; check the plugin documentation.)
>>
>> Hope that helps,
>>
>> Thomas
>-----Original Message-----
>From: jill han
>Sent: Monday, September 24, 2007 3:26 PM
>To: 'Apache Torque Users List'
>Subject: RE: m2 torque plugin
>Thanks for the reply, Thomas
>I am using torque-3.1.1
>Is there any sample pom to show how the <plugin> is constructed?
>
>Thanks,
>
>Jill
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]