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