Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find artifact hibernate

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 !!

like image 481
Linconnue55 Avatar asked Dec 04 '22 17:12

Linconnue55


1 Answers

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

like image 55
ccheneson Avatar answered Dec 11 '22 19:12

ccheneson