Is there a tutorial that works? There seems to be new versions and old tutorial in the current distro. I can't seem to make it work.
First, the home page says,
"Download Hibernate 3.2 and extract the archive."
But, I go to the download page and I find.
hibernate-distribution-3.3.2.GA-dist.tar.gz
So, not too much of a problem. I download it, open the manual
hibernate-distribution-3.3.2.GA/documentation/manual/en-US/hibernate_reference.pdf
Chapter 1 is a tutorial. Excellent, but I can't get hsqldb to start using maven.
cat pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hibernate.tutorials</groupId>
<artifactId>hibernate-tutorial</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>First Hibernate Tutorial</name>
<build>
<!-- we dont want the version to be part of the generated war file name -->
<finalName>${artifactId}</finalName>
</build>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<!-- Because this is a web app, we also have a dependency on the servlet api. -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<!-- Hibernate uses slf4j for logging, for our purposes here use the simple backend -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<!-- Hibernate gives you a choice of bytecode providers between cglib and javassist -->
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</dependency>
</dependencies>
</project>
But, I go to start hsqldb using the suggested maven command, and I get the following error.
mvn exec:java -Dexec.mainClass="org.hsqldb.Server" -Dexec.args="-database.0 file:target/data/tutorial"
and I get the following error.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.hibernate.tutorials:hibernate-tutorial
POM Location: /home/brian/hibernateTutorial/pom.xml
Validation Messages:
[0] 'dependencies.dependency.version' is missing for org.hibernate:hibernate-core
[1] 'dependencies.dependency.version' is missing for javax.servlet:servlet-api
[2] 'dependencies.dependency.version' is missing for org.slf4j:slf4j-simple
[3] 'dependencies.dependency.version' is missing for javassist:javassist
Reason: Failed to validate POM for project org.hibernate.tutorials:hibernate-tutorial at /home/brian/hibernateTutorial/pom.xm
l