Thanks Brandon and Paul.  Your messages were really helpful.

I was able to get it working with Paul's example.





On Feb 19, 2005, at 3:52 PM, Brandon Mayes wrote:

Yeah you definitely need to define the mysql driver as a dependency in your
project.xml file. I'm going to expand on the first reply you got...and go
into a bit more detail, but everything he said is correct. I actually found
that the driver listed on the torque project page didn't work. I had to
change it and instead I used "com.mysql.jdbc.Driver" and it worked after
that. If you don't include the URL in your dependency, or it fails to
download it, you're going to want to find your maven home directory. On
Windows I think by default it goes to C:\documents and
settings\<userName>\.maven (notice the dot before maven since it's a hidden
directory) I'm not sure where it goes on Linux...I haven't tried on my
Slackware system yet (maybe in /home/<userName>/.maven??) . In any case,
once you find $mavenHome there are two directories in there, cache and
repository. You need to make sure that all dependencies listed in your
project.xml file have a corresponing directory in $mavenHome/repository and
so my path looks like this for my jdbc driver:


C:\documents and
settings\bmayes\.maven\repository\mysql-connector-java\jars\mysql- connector-java-3.1.6.jar


Now here's my project.xml with only the jdbc driver listed as a dependency:

<project>
 <dependencies>

   <dependency>
     <groupId>mysql-connector-java</groupId>
     <artifactId>mysql-connector-java</artifactId>
     <version>3.1.6</version>
   </dependency>

 </dependencies>
</project>


Hope everything works.

-Brandon



----- Original Message -----
From: "Paul Osborne" <[EMAIL PROTECTED]>
To: "'Apache Torque Users List'" <[email protected]>
Sent: Saturday, February 19, 2005 3:17 PM
Subject: RE: how do I define db driver path?


Hi Jon
Have you defined the mysql driver in your ./project.xml? If not, you need an
entry that looks something like:
...
<dependencies>
<dependency>
<groupId>mm-mysql</groupId>
<artifactId>mm-mysql</artifactId>
<version>2.0.13-bin</version>
<url>http://www.ibiblio.org/maven/mm-mysql/</url>
<!-- include in WAR file (optional) -->
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
...
</dependencies>
...
This will get Maven to download the module into your repository and add the
necessary classes to the torque-plugin classpath.
http://www.ibiblio.org/maven/mm-mysql/jars/ shows the various versions for
download.
Hope this helps.
Paul


-----Original Message-----
From:
torque-user-return-5814-paul.osborne=morley- [EMAIL PROTECTED]
[mailto:torque-user-return-5814-paul.osborne=morley- [EMAIL PROTECTED]
e.org] On Behalf Of Jonathan August
Sent: 19 February 2005 08:07
To: [email protected]
Subject: how do I define db driver path?



I'm having a real hard time figuring out how to get torque working. I'm following the tutorial and I get this error when I run:

maven torque:create-db

BUILD FAILED
File......
/Users/jon/.maven/cache/maven-torque-plugin-3.1.1/plugin.jelly
Element... sql
Line...... 394
Column.... 44
Class Not Found: JDBC driver org.gjt.mm.mysql.Driver could not be loaded


How do I tell maven where my driver is?  It's in my classpath...

-Jon



---------------------------------------------------------------------
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]

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee� Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

----
Jon August
Internection
1-866-345-HOST


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to