-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate with hsqldb and maven
PostPosted: Thu Jul 19, 2007 8:39 pm 
Newbie

Joined: Thu Jul 19, 2007 8:33 pm
Posts: 4
Hi everyone,

I'm a beginner to hibernate, and i'm trying to do michael de groegle's tutorial using maven to build the project as i will be starting work experience soon with this stuff and in the company i'll be working with this is the way they've asked me to do it!!

Using examples I've found on the net, I've added dependencies for both hibernate and hsqldb, so for maven my pom.xml looks like this:

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.groegl.road2hibernate</groupId>
<artifactId>HibernateTutorial</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>HibernateTutorial</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.6</version>
</dependency>
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.4.spl</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

The versions are correct and i have both hibernate and hsqldb downloaded and unzipped..

When i run mvn eclipse:eclipse i get the following :

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building HibernateTutorial
[INFO] task-segment: [eclipse:eclipse]
[INFO] ----------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO] [eclipse:eclipse]
Downloading: http://repo1.maven.org/maven2/hibernate ... .4.spl.pom
Downloading: http://repo1.maven.org/maven2/hsqldb/hs ... .8.0.6.pom
Downloading: http://repo1.maven.org/maven2/hibernate ... .4.spl.jar
[WARNING] An error occurred during dependency resolution.
Failed to retrieve hibernate:hibernate-3.2.4.spl
Caused by: Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=hibernate -DartifactId=hibernate \
-Dversion=3.2.4.spl -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=hibernate -DartifactId=hibernate \
-Dversion=3.2.4.spl -Dpackaging=jar -Dfile=/path/to/file \
-Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) de.groegl.road2hibernate:HibernateTutorial:jar:1.0-SNAPSHOT
2) hibernate:hibernate:jar:3.2.4.spl


hibernate:hibernate:jar:3.2.4.spl

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

[INFO] Unable to read jar manifest from /home/karen/.m2/repository/hibernate/hibernate/3.2.4.spl/hibernate-3.2.4.spl.jar
Downloading: http://repo1.maven.org/maven2/hsqldb/hs ... .8.0.6.jar
[WARNING] An error occurred during dependency resolution.
Failed to retrieve hsqldb:hsqldb-1.8.0.6
Caused by: Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=hsqldb -DartifactId=hsqldb \
-Dversion=1.8.0.6 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=hsqldb -DartifactId=hsqldb \
-Dversion=1.8.0.6 -Dpackaging=jar -Dfile=/path/to/file \
-Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) de.groegl.road2hibernate:HibernateTutorial:jar:1.0-SNAPSHOT
2) hsqldb:hsqldb:jar:1.8.0.6


hsqldb:hsqldb:jar:1.8.0.6

from the specified remote repositories:
central (http://repo1.maven.org/maven2)

[INFO] Unable to read jar manifest from /home/karen/.m2/repository/hsqldb/hsqldb/1.8.0.6/hsqldb-1.8.0.6.jar
[INFO] Using source status cache: /home/karen/development/workspace/HibernateTutorial/target/mvn-eclipse-cache.properties
[INFO] Not writing settings - defaults suffice
[INFO] File /home/karen/development/workspace/HibernateTutorial/.project already exists.
Additional settings will be preserved, run mvn eclipse:clean if you want old settings to be removed.
[INFO] Wrote Eclipse project for "HibernateTutorial" to /home/karen/development/workspace/HibernateTutorial.
[INFO]
Sources for some artifacts are not available.
Please run the same goal with the -DdownloadSources=true parameter in order to check remote repositories for sources.
List of artifacts without a source archive:
o junit:junit:3.8.1
o hibernate:hibernate:3.2.4.spl
o hsqldb:hsqldb:1.8.0.6

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Jul 20 01:24:25 IST 2007
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------


Although it says build successful it is telling me it could not find hibernate or hsqldb jars.. I have no idea why.

I'm new to all of this, maybe I have to have things in specific directories or something?

Hope someone can help =) thanks in advance!
Pinky :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.