Here is what I did:
------------------------
# Downloading and unpacking
$wget http://jakarta.apache.org/.../torque-gen-3.1.tar.gz
$tar xvzf torque-gen-3.1.tar.gz
$cd torque-gen-3.1
$cat > build.properties << EOF
torque.project = bookstore
torque.database = mysql
torque.targetPackage = com.kazmier.om
torque.database.createUrl = jdbc:mysql://127.0.0.1/mysql
torque.database.buildUrl = jdbc:mysql://127.0.0.1/bookstore
torque.database.url = jdbc:mysql://127.0.0.1/bookstore
torque.database.driver = org.gjt.mm.mysql.Driver
torque.database.user = root
torque.database.password = ....
torque.database.host = 127.0.0.1
EOF
$cat > schema/project-schema.xml << EOF
<< full schema from tutorial >>
EOF
$cat > Torque.properties << EOF
log4j.rootCategory = DEBUG, default
log4j.appender.default = org.apache.log4j.FileAppender
log4j.appender.default.file = ./torque.log
log4j.appender.default.layout = org.apache.log4j.SimpleLayout
torque.database.default = bookstore
torque.database.bookstore.driver = org.gjt.mm.mysql.Driver
torque.database.bookstore.url = jdbc:mysql://127.0.0.1/bookstore
torque.database.bookstore.username = root
torque.database.bookstore.password = ....
EOF
# Build sql and java-sources
$ant -f build-torque.xml
....
BUILD SUCCESSFUL
Total time: 8 seconds
# Link mysql-driver. Didn't found anything about that in the tutorial.
$ln -s /usr/...../mysql-connector-java-3.0.9-stable-bin.jar lib/
$ant -f build-torque.xml create-db
....
[sql] 2 of 2 SQL statements executed successfully
BUILD SUCCESSFUL
Total time: 4 seconds
$ant -f build-torque.xml id-table-init-sql
....
BUILD SUCCESSFUL
$ant -f build-torque.xml insert-sql
....
[torque-sql-exec] 11 of 11 SQL statements executed successfully
BUILD SUCCESSFUL
# Everything looks good until now.
$ant -f build-torque.xml compile
Buildfile: build-torque.xml
compile:
[javac] Compiling 15 source files
to /home/thomas/torque-test/torque-gen-3.1/bin/classes
[javac]
/home/thomas/torque-test/torque-gen-3.1/src/java/com/kazmier/om/map/BookMapBuilder.java:6:
package org.apache.torque does not exist
...
[javac] 100 errors
BUILD FAILED
file:/home/thomas/torque-test/torque-gen-3.1/build-torque.xml:663: Compile
failed; see the compiler error output for details.
Total time: 4 seconds
--------------------------------------------------
Did I missed something?
Many thanks for your help.
Thomas
On Tuesday 10 February 2004 01:09, [EMAIL PROTECTED] wrote:
> Thomas,
>
> If you want to use the schema anywhere outside the torque main
> directory you must change one of the properties in the
> build-torque.xml, namely
>
> <property name="lib.dir" location="YOUR_TORQUE_LIB_LOCATION"/>
>
> for example I've got...
> <property name="lib.dir" location="/usr/local/torque/lib"/>
>
> or (a more flexible solution) you can set yet another property in
> your build.properties file so that it refers to the torque lib
>
> for example in build.properties you add:
>
> torque.lib.location = /usr/local/torque/lib
>
> and then in the build-torque.xml you change the line to:
>
> <property name="lib.dir" location="${torque.lib.location}"/>
>
> then you can create the appropriate directory structure (just one
> directory with your xml database schema) anywhere and it will work.
>
>
> Cheers
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]