Date: 2004-03-17T16:51:28
Editor: 128.200.36.28 <>
Wiki: DB Torque Wiki
Page: TutorialErrata
URL: http://wiki.apache.org/db-torque/TutorialErrata
discussion of building from CVS with maven
Change Log:
------------------------------------------------------------------------------
@@ -19,9 +19,57 @@
* the directory structure is nothing like that listed in any of the docs, which is
really vexing....
* so I used maven, that seeming to be the thing to do, and because I couldn't find
the files to modify to go the ant route.
- * In retrospect, maven use could be pretty painless, except for the following
problem that kept tripping me up. If I did the following:{ { {
- cd db-torque;
+ * In retrospect, maven use could be pretty painless, except for the following
problem that kept tripping me up. If I did the following:{{{
+ cd db-torque
maven install:plugin
maven torque:jdbc
-} } } Then I would get an error, as the maven plugin could not find the source for my
org.postgres.Driver
-
+}}}
+
+ Then I would get an error, as the maven plugin could not find the source for my
org.postgres.Driver. The only fix I could figure out was to directly edit
{{{~/.maven/plugins/maven-torque-plugin-3.2/project.xml}}} and insert the following
dependecy node: {{{
+ <dependency>
+ <id>postgresql</id>
+ <version>7.4.1-jdbc3</version>
+ <properties>
+ <classloader>root</classloader>
+ </properties>
+ </dependency>
+ }}}
+
+ I could not get this dependency to stick by editing any of the project.xml files in
db-torque, nor in {{{myproject/project.xml}}}. After adding that hack, the following
worked: {{{
+ mkdir newproject
+ cd newproject
+ [create project.xml]
+ mkdir -p src/schema
+ touch src/schema/schema.xml
+ maven torque:jdbc
+}}} producing the following output (with my server name changed) {{{
+| \/ |__ _Apache__ ___
+| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
+|_| |_\__,_|\_/\___|_||_| v. 1.0-rc1-SNAPSHOT
+
+torque:init:
+
+torque:jdbc:
+ [torque-jdbc-transform] Torque - JDBCToXMLSchema starting
+ [torque-jdbc-transform] Your DB settings are:
+ [torque-jdbc-transform] driver : org.postgresql.Driver
+ [torque-jdbc-transform] URL : jdbc:postgresql://your.server.com:5432/tracer
+ [torque-jdbc-transform] user : susieq
+ [torque-jdbc-transform] schema :
+ [torque-jdbc-transform] DB driver sucessfuly instantiated
+ [torque-jdbc-transform] DB connection established
+ [torque-jdbc-transform] Getting table list...
+ [torque-jdbc-transform] Building column/table map...
+ [torque-jdbc-transform] Processing table: arbitrary_points
+ [torque-jdbc-transform] Processing table: geometry_columns
+ [torque-jdbc-transform] Processing table: gps_obs
+ [torque-jdbc-transform] Processing table: gps_segment
+ [torque-jdbc-transform] Processing table: gps_trace
+ [torque-jdbc-transform] Processing table: spatial_ref_sys
+ [torque-jdbc-transform] /home/susieq/javawork/newproject/src/schema/schema.xml
+ [torque-jdbc-transform] Torque - JDBCToXMLSchema finished
+BUILD SUCCESSFUL
+Total time: 12 seconds
+Finished at: Wed Mar 17 16:25:13 PST 2004
+}}}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]