1
我正在用hibernate和maven製作一個web應用程序,我無法下載hibernate依賴關係。下載休眠依賴關係
這是我的依賴行:
<dependencies>
<!-- JDBC driver -->
<dependency>
<groupId>${jdbcDriver.groupId}</groupId>
<artifactId>${jdbcDriver.artifactId}</artifactId>
<version>${jdbcDriver.version}</version>
<scope>test</scope>
</dependency>
<!-- SLF4J (required by Hibernate) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Javassist (required by Hibernate) -->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
<scope>runtime</scope>
</dependency>
<!-- CGLIB (required by Spring) -->
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>${cglib.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Servlet API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servletApi.version}</version>
<scope>provided</scope>
</dependency>
<!-- Tapestry -->
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-core</artifactId>
<version>${tapestry.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-spring</artifactId>
<version>${tapestry.version}</version>
</dependency>
</dependencies>
我試圖MVN蝕:elicpse然後MVN安裝-U但我仍然得到以下錯誤的,其中包括休眠註釋每行代碼
[ERROR] \Users\Radorf\workspace\pfcswim\src\main\java\e\v\v\pfcswim\model\user\User.java:[5,24] error: package javax.persistence does not exist
我試過了,但它不工作。 反正謝謝你。 – Radorf
你確定你獲得了依賴嗎?檢入'〜/ .m2'。另請參閱我編輯的答案。你想要什麼Hibernate版本? –
我試過你發佈的內容,但仍然無法正常工作。我檢查了/.m2目錄,我猜這個jar應該在m2 \ repository \ org中,但是我不能在那裏找到它,所以無論什麼原因,我都無法下載它。 – Radorf