Documentation bug - reference contains a wrong POM in the tutorial section

Description

The POM shown in the tutorial section of Hibernate Reference (http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#tutorial-firstapp-setup) is unusable

An build attempt ( mvn clean install ) results in

[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: D:\t\000\pom.xml
Validation Messages:

[0] 'dependencies.dependency.version' is missing for org.hibernate:hibernate-core:jar
[1] 'dependencies.dependency.version' is missing for javax.servlet:servlet-api:jar
[2] 'dependencies.dependency.version' is missing for org.slf4j:slf4j-simple:jar
[3] 'dependencies.dependency.version' is missing for javassist:javassist:jar

Reason: Failed to validate POM for project org.hibernate.tutorials:hibernate-tutorial at D:\t\000\pom.xml

[INFO] ------------------------------------------------------------------------ [INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to validate POM for project org.hibernate.tutorials:hibernate-tutorial at D:\t\000\pom.xml
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to validate POM for project org.hibernate.tutorials:hibernate-tutorial at D:\t\000\pom.xml
at org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1077)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
... 12 more
[INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second
[INFO] Finished at: Thu Aug 05 13:24:06 CEST 2010
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------

Maven 2.0.09 and 2.2.1.

I guess the cause is that this POM was created by a naive "stripping-out" the POM from the "tutorials" module in the Hibernate distribution - but that POM is inherited from hibernate-parent. If this inheritance is lost all versions shall be specified explicitly.

Environment

None

Activity

Show:
Steve Ebersole
August 27, 2010, 5:23 AM

It was not done naively, but I think we now have a way to manage it. The problem was not wanting to manually update these versions on every single release.

Oleksandr Alesinskyy
August 27, 2010, 5:34 AM

It was possible at least mention in the comments that POM is incomplete and appropriate versions should be specified.
Note that experienced Maven users hardly would use your POM - and inexperienced will be bewildered.

Steve Ebersole
August 27, 2010, 5:58 AM

I'm what most people would call an "experienced Maven user" and it leaves me bewildered all the time anyway...

Yes, coulda/shoulda/woulda. Thats the reason there is a bug report

Strong Liu
August 29, 2010, 3:50 AM
Steve Ebersole
September 1, 2010, 7:11 AM

This is "fixed" in the new Getting Started Guide (see and related). The tutorial portions of the existing reference manual will be removed eventually replace with the Developer Guide (see and related).

Won't Fix

Assignee

Steve Ebersole

Reporter

Oleksandr Alesinskyy

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major