Bonjour,
Je travaille avec un tutoriel pour Hibernate :http://docs.jboss.org/hibernate/orm/.../tutorial.html
Après avoir installé JBoss et Eclipse Juno, je me suis mis à construire l'arborescence (cf. l'image attachée), à laquelle j'ai ajouté le fichier hibernate-core.jar, sans oublier de l'intégrer dans le "build path". Le problème est que si je veux démarrer le fichier pom.xml comme "maven build" ("run as maven build"), il y a toujours les erreurs suivantes:
Pourquoi dit-il que la dépendance de hibernate-core n'existe pas ?[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.hibernate.tutorials:hibertut:1.0.0-SNAPSHOT (C:\Users\MON_NOM\workspace\hibertut\src\main\java\pom.xml) has 4 errors
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-core:jar is missing. @ line 18, column 21
[ERROR] 'dependencies.dependency.version' for javax.servlet:servlet-api:jar is missing. @ line 24, column 21
[ERROR] 'dependencies.dependency.version' for org.slf4j:slf4j-simple:jar is missing. @ line 30, column 21
[ERROR] 'dependencies.dependency.version' for javassist:javassist:jar is missing. @ line 36, column 21
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/d...ldingException
Voici mon pom.xml
Merci d'avance pour votre aide.
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 <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>hibertut</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>
Partager