hibernate - 找不到 org.hibernate :hibernate-dependencies:pom:3. 3.2.GA 失败

标签 hibernate maven repository

我使用的是 Maven 3.0.3。我在下载依赖项时遇到问题并收到错误,“无法在 http://mavenrepo.google-api-java-client.googlecode.com/hg 中找到 org.hibernate:hibernate-dependency:pom:3.3.2.GA 已缓存在本地存储库中,解析将不会重新尝试,直到google-api-services 的更新间隔已过或强制更新”。我在 Maven 中使用“-U”标志,但没有效果。这是我遇到的错误...

davea$ mvn clean install -U -Dmaven.test.skip=true
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building event-maven 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://mavenrepo.google-api-java-client.googlecode.com/hg/org/hibernate/hibernate-dependencies/3.3.2.GA/hibernate-dependencies-3.3.2.GA.pom
Downloading: https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/org/hibernate/hibernate-dependencies/3.3.2.GA/hibernate-dependencies-3.3.2.GA.pom
Downloading: http://repo.maven.apache.org/maven2/org/hibernate/hibernate-dependencies/3.3.2.GA/hibernate-dependencies-3.3.2.GA.pom
[WARNING] The POM for org.hibernate:hibernate-dependencies:pom:3.3.2.GA is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.401s
[INFO] Finished at: Thu Mar 01 14:23:05 CST 2012
[INFO] Final Memory: 6M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project event-maven: Could not resolve dependencies for project com.myco.eventmaven:event-maven:war:1.0-SNAPSHOT: Failure to find org.hibernate:hibernate-dependencies:pom:3.3.2.GA in http://mavenrepo.google-api-java-client.googlecode.com/hg was cached in the local repository, resolution will not be reattempted until the update interval of google-api-services has elapsed or updates are forced -> [Help 1]
[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/display/MAVEN/DependencyResolutionException

我包含了完整的 pom.xml,包括存储库。有人知道我该如何解决这个错误吗?谢谢,-戴夫

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myco.eventmaven</groupId>
<artifactId>event-maven</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>event-maven</name>
<url>http://maven.apache.org</url>

<!-- Shared version number properties -->
<properties>
    <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
</properties>

<repositories>
    <repository>
        <id>google-api-services</id>
        <url>http://mavenrepo.google-api-java-client.googlecode.com/hg</url>
    </repository>
    <repository>
        <id>repository.jboss.org-public</id>
        <name>JBoss.org Maven repository</name>
        <url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/</url>
    </repository>
</repositories>

<dependencies>
    <!-- Library for parsing RSS feeds -->
    <dependency>
        <groupId>rome</groupId>
        <artifactId>rome</artifactId>
        <version>1.0</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-calendar</artifactId>
        <version>v3-1.3.1-beta</version>
    </dependency>
    <dependency>
        <groupId>google</groupId>
        <artifactId>gdata-core</artifactId>
        <version>1.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>google</groupId>
        <artifactId>gdata-calendar</artifactId>
        <version>2.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>google</groupId>
        <artifactId>gdata-client</artifactId>
        <version>1.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>google</groupId>
        <artifactId>gdata-client-meta</artifactId>
        <version>1.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>google</groupId>
        <artifactId>gdata-calendar-meta</artifactId>
        <version>2.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>google</groupId>
        <artifactId>collect</artifactId>
        <version>1.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>jsr305</artifactId>
        <version>1.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <!-- Core utilities used by other modules. Define this if you use Spring 
        Utility APIs (org.springframework.core.*/org.springframework.util.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Expression Language (depends on spring-core) Define this if you use 
        Spring Expression APIs (org.springframework.expression.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-expression</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Bean Factory and JavaBeans utilities (depends on spring-core) Define 
        this if you use Spring Bean APIs (org.springframework.beans.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Aspect Oriented Programming (AOP) Framework (depends on spring-core, 
        spring-beans) Define this if you use Spring AOP APIs (org.springframework.aop.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Application Context (depends on spring-core, spring-expression, spring-aop, 
        spring-beans) This is the central artifact for Spring's Dependency Injection 
        Container and is generally always defined -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Various Application Context utilities, including EhCache, JavaMail, 
        Quartz, and Freemarker integration Define this if you need any of these integrations -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Transaction Management Abstraction (depends on spring-core, spring-beans, 
        spring-aop, spring-context) Define this if you use Spring Transactions or 
        DAO Exception Hierarchy (org.springframework.transaction.*/org.springframework.dao.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- JDBC Data Access Library (depends on spring-core, spring-beans, spring-context, 
        spring-tx) Define this if you use Spring's JdbcTemplate API (org.springframework.jdbc.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Object-to-Relation-Mapping (ORM) integration with Hibernate, JPA, 
        and iBatis. (depends on spring-core, spring-beans, spring-context, spring-tx) 
        Define this if you need ORM (org.springframework.orm.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Object-to-XML Mapping (OXM) abstraction and integration with JAXB, 
        JiBX, Castor, XStream, and XML Beans. (depends on spring-core, spring-beans, 
        spring-context) Define this if you need OXM (org.springframework.oxm.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-oxm</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Web application development utilities applicable to both Servlet and 
        Portlet Environments (depends on spring-core, spring-beans, spring-context) 
        Define this if you use Spring MVC, or wish to use Struts, JSF, or another 
        web framework with Spring (org.springframework.web.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Spring MVC for Servlet Environments (depends on spring-core, spring-beans, 
        spring-context, spring-web) Define this if you use Spring MVC with a Servlet 
        Container such as Apache Tomcat (org.springframework.web.servlet.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Spring MVC for Portlet Environments (depends on spring-core, spring-beans, 
        spring-context, spring-web) Define this if you use Spring MVC with a Portlet 
        Container (org.springframework.web.portlet.*) -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc-portlet</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- Support for testing Spring applications with tools such as JUnit and 
        TestNG This artifact is generally always defined with a 'test' scope for 
        the integration testing framework and unit testing stubs -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${org.springframework.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.15</version>
        <exclusions>
<exclusion>
    <groupId>com.sun.jmx</groupId>
    <artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
    <groupId>com.sun.jdmk</groupId>
    <artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
        <groupId>javax.jms</groupId>
        <artifactId>jms</artifactId>
</exclusion>
</exclusions>
    </dependency>

    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-dependencies <!--or hibernate-core--></artifactId>
        <version>3.3.2.GA</version>
        <type>pom</type>
        <!--hibernate-dependencies is a pom, not needed for hibernate-core -->
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.4.0.GA</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>3.1.0.GA</version>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <version>1.1.3</version>
            <configuration>
                <container>
                    <containerId>jboss71x</containerId>
                    <type>remote</type>
                </container>
            </configuration>
            <executions>
                <execution>
                    <id>deploy</id>
                    <phase>install</phase>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
</project>

最佳答案

Maven 存储库中不存在

hibernate-dependency

如果你想使用Hibernate,请使用hibernate-core:

<dependency>
     <groupId>org.hibernate</groupId>
     <artifactId>hibernate-core</artifactId>
     <version>3.3.2.GA</version>
</dependency>

另外,请小心,我认为最好对所有 Hibernate Artifact 使用相同的版本。

关于hibernate - 找不到 org.hibernate :hibernate-dependencies:pom:3. 3.2.GA 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9523545/

相关文章:

mysql - Hibernate数据访问上的JDBC异常:SQL的SQLException [n/a]; SQL状态[HY000];错误代码[1366]

oracle - ORA-12519,TNS :no appropriate service handler found

mysql - 独特的约束和 Hibernate

使用 Maven 的 Java 无法构建 : Cannot run program "cmd" "Malformed argument has embedded quote"

java - 如何在使用 maven 构建的 war 中包含系统依赖项

git - 将本地仓库与 Github 项目 merge

java - JPA(Hibernate)保存ManyToOne关系的问题

java - slf4j log4j Hello World 问题

asp.net - EF 模型和代码使用者之间存储库的使用

spring - Controller、Service、Repository 和简单的委托(delegate)方法