Reputation: 187
this is my pom.xml
<repositories>
<repository>
<url>http://download.java.net/maven/2/</url>
<id>hibernate-support</id>
<layout>default</layout>
<name>Repository for library Library[hibernate-support]</name>
</repository>
</repositories>
<dependencies>
<!-- MySQL database driver -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.9</version>
</dependency>
<!-- Spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<!-- Hibernate core -->
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate3</artifactId>
<version>3.2.3.GA</version>
</dependency>
<!-- Hibernate core library dependecy start -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2</version>
</dependency>
<!-- Hibernate core library dependecy end -->
<!-- Hibernate query library dependecy start -->
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</dependency>
<!-- For Servlet Container like Tomcat -->
<!-- http://download.java.net/maven/2 -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>
<!-- http://repo1.maven.org/maven2/ -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
<build>
<finalName>JavaServerFaces</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
</properties>
But i have this ERROR :
Failed to execute goal on project JavaServerFaces: Could not resolve dependencies for project com.mkyong.common:JavaServerFaces:war:1.0-SNAPSHOT: Could not find artifact hibernate:hibernate3:jar:3.2.3.GA in hibernate-support (http://download.java.net/maven/2/) -> [Help 1]
Can you please tell me where is it the wrong !!
Upvotes: 4
Views: 15149
Reputation: 533
If these ("Missing artifact org.hibernate:hibernate:jar:3.2.3.ga") kind of error occurs, kindly look the latest version for hibernate and update it.
The above answers are correct, but that are stick with one particular versions but that will not be worked in the future.
The link below will have the versions of hibernate and make the choose based on yours
https://mvnrepository.com/artifact/org.hibernate/hibernate-core/5.3.1.Final
Upvotes: 0
Reputation: 458
Even after adding hibernate 3.2.3.ga, you may get bellow error "Missing artifact javax.transaction:jta:jar:1.0.1B"
fix for this will be adding jta dependency as below "javax.transactionjta1.1"
Upvotes: 0
Reputation: 6685
Could not find artifact hibernate:hibernate3:jar:3.2.3.GA in hibernate-support (http://download.java.net/maven/2/)
Either you have the wrong external repository or the wrong hinbernate dependency definition.
Upvotes: 0
Reputation: 54427
Can you try the following instead of the Hibernate one you're including?
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.3.ga</version>
</dependency>
The one you're using has an old and no longer valid group and artifact ID.
Upvotes: 0
Reputation: 49410
The hibernate
dependency seems to be wrong ( the artifactId
).
Try
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.3.ga</version>
</dependency>
See http://mvnrepository.com/artifact/org.hibernate/hibernate/3.2.3.ga
Upvotes: 16