-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate 4.1.1 tutorials
PostPosted: Sat Mar 31, 2012 2:22 pm 
Newbie

Joined: Sat Mar 31, 2012 2:04 pm
Posts: 2
I just downloaded Hibernate 4.1.1 and I thought I'd try the tutorials
included.

(material at hibernate-release-4.1.1.Final/project/documentation/src/main/docbook/quickstart/tutorials)

The tutorial examples are build with Maven and the POMs have unresolved
references.
Code:
    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>$version</version>
        </dependency>

        <!-- Hibernate uses jboss-logging for logging, for the tutorials we will use the sl4fj-simple backend -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>$slf4j</version>
        </dependency>

        <!-- The tutorials use JUnit test cases to illustrate usage -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>$junit</version>
        </dependency>

        <!-- The tutorials use the H2 in-memory database -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>$h2</version>
        </dependency>
    </dependencies>

How are $version, $slf4j, $junit and $h2 supposed to get defined? I
know about defining properties (${property.name}), but I'm not familiar
with this syntax ($name with no curly braces).

Maven build fails with errors
Code:
[WARNING] The POM for org.hibernate:hibernate-core:jar:$version is missing, no dependency information available
[WARNING] The POM for org.slf4j:slf4j-simple:jar:$slf4j is missing, no dependency information available
[WARNING] The POM for junit:junit:jar:$junit is missing, no dependency information available
[WARNING] The POM for com.h2database:h2:jar:$h2 is missing, no dependency information available

    .
    .
    .

[ERROR] Failed to execute goal on project hibernate-tutorial-hbm: Could not resolve dependencies for project org.hibernate.tutorials:hibernate-tutorial-hbm:jar:$version: The following artifacts could not be resolved: org.hibernate:hibernate-core:jar:$version, org.slf4j:slf4j-simple:jar:$slf4j, junit:junit:jar:$junit, com.h2database:h2:jar:$h2: Failure to find org.hibernate:hibernate-core:jar:$version in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]


Thanks in advance


Top
 Profile  
 
 Post subject: Re: Hibernate 4.1.1 tutorials
PostPosted: Sat Mar 31, 2012 5:56 pm 
Newbie

Joined: Sat Mar 31, 2012 2:04 pm
Posts: 2
I used Eclipse to do a global search and replace on $version,
$slf4j, $junit and $h2, but I'm still curious how this is supposed
to work.


Top
 Profile  
 
 Post subject: Re: Hibernate 4.1.1 tutorials
PostPosted: Tue Sep 11, 2012 11:43 pm 
Newbie

Joined: Tue Sep 11, 2012 11:36 pm
Posts: 2
I experienced the same problem. What I did was to search the right dependency setting on the maven repository for Hibernate.

http://search.maven.org


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

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.