2016-09-14 110 views
0

突然間,我在使用Maven構建項目時收到錯誤消息。這是堆棧跟蹤:Maven:無法執行項目目標。休眠5從repo.spring.io?

[ERROR] Failed to execute goal on project repgen: Could not resolve dependencies for project ee.estcard.repgen:repgen:jar:0.1: Failure to find org.hibernate:hiberna 
te-entitymanager:jar:5.2.0.Final in https://repo.spring.io/libs-release was cached in the local repository, resolution will not be reattempted until the update inte 
rval of spring-releases 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 

我檢查的春天回購,似乎只有3.1版公測: https://repo.spring.io/libs-release/hibernate/hibernate-entitymanager/

有什麼事與他們的回購還是我做錯了什麼。在......之前一切正常......?

這是我的POM:

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 
     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>repgen</groupId> 
    <artifactId>repgen</artifactId> 
    <version>0.1</version> 

    <name>repgen</name> 
    <packaging>jar</packaging> 

    <parent> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-parent</artifactId> 
     <version>1.4.0.RELEASE</version> 
    </parent> 

    <properties> 
     <!-- Generic properties --> 
     <java.version>1.8</java.version> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 
     <hibernate.version>5.2.0.Final</hibernate.version> 
     <!-- Test --> 
     <assertj.version>2.2.0</assertj.version> 
     <start-class>ee.estcard.repgen.Application</start-class> 
    </properties> 

    <dependencies> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-data-jpa</artifactId> 
      <exclusions> 
       <exclusion> 
        <groupId>org.hibernate</groupId> 
        <artifactId>hibernate-entitymanager</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-jdbc</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-actuator</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-starter-test</artifactId> 
      <scope>test</scope> 
     </dependency> 
     <!-- HIBERNATE --> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-entitymanager</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-validator</artifactId> 
     </dependency> 
     <!-- Logging with SLF4J & LogBack --> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
     </dependency> 
     <dependency> 
      <groupId>ch.qos.logback</groupId> 
      <artifactId>logback-classic</artifactId> 
      <scope>runtime</scope> 
     </dependency> 
     <!-- JODA-TIME --> 
     <dependency> 
      <groupId>joda-time</groupId> 
      <artifactId>joda-time</artifactId> 
      <version>2.9.4</version> 
     </dependency> 
     <!-- SAXON XSLT Processor --> 
     <dependency> 
      <groupId>net.sf.saxon</groupId> 
      <artifactId>Saxon-HE</artifactId> 
      <version>9.7.0-8</version> 
     </dependency> 
     <!-- apache for for xsl-fo object formatting --> 
     <dependency> 
      <groupId>org.apache.xmlgraphics</groupId> 
      <artifactId>fop</artifactId> 
      <version>2.1</version> 
     </dependency> 
     <!-- Databases - Oracle --> 
     <dependency> 
      <groupId>com.oracle</groupId> 
      <artifactId>ojdbc6</artifactId> 
      <version>11.2.0.4</version> 
     </dependency> 
     <!-- Test Artifacts --> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <scope>test</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.assertj</groupId> 
      <artifactId>assertj-core</artifactId> 
      <version>${assertj.version}</version> 
      <scope>test</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.mockito</groupId> 
      <artifactId>mockito-core</artifactId> 
      <scope>test</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.commons</groupId> 
      <artifactId>commons-lang3</artifactId> 
      <version>3.4</version> 
      <scope>test</scope> 
     </dependency> 
     <dependency> 
      <groupId>org.dbunit</groupId> 
      <artifactId>dbunit</artifactId> 
      <version>2.5.1</version> 
      <scope>test</scope> 
      <exclusions> 
       <exclusion> 
        <artifactId>junit</artifactId> 
        <groupId>junit</groupId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>com.github.springtestdbunit</groupId> 
      <artifactId>spring-test-dbunit</artifactId> 
      <version>1.2.1</version> 
      <scope>test</scope> 
     </dependency> 
    </dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.springframework.boot</groupId> 
       <artifactId>spring-boot-maven-plugin</artifactId> 
      </plugin> 
     </plugins> 
    </build> 
    <repositories> 
     <repository> 
      <id>spring-releases</id> 
      <name>Spring Releases</name> 
      <url>https://repo.spring.io/libs-release</url> 
     </repository> 
     <repository> 
      <id>org.jboss.repository.releases</id> 
      <name>JBoss Maven Release Repository</name> 
      <url>https://repository.jboss.org/nexus/content/repositories/releases</url> 
     </repository> 
    </repositories> 
    <pluginRepositories> 
     <pluginRepository> 
      <id>spring-releases</id> 
      <name>Spring Releases</name> 
      <url>https://repo.spring.io/libs-release</url> 
     </pluginRepository> 
    </pluginRepositories> 
</project> 

回答

相關問題