我想将hibernate源代码作为java项目导入eclipse。我是这个领域的新手,我被困住了。我按照https://community.jboss.org/wiki/BuildingHibernateORM4x5x中的说明进行操作。安装了git,下载了hibernate-orm。接下来我这样做./gradlew eclipse
了,但出现以下错误。
Downloading http://services.gradle.org/distributions/gradle-1.6-bin.zip
Unzipping /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6-bin.zip to /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:132)
at java.util.zip.ZipFile.<init>(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more
所以我下载了 gradle-1.6.bin.zip 并将其复制到/home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/
文件夹中并运行相同的命令,这次我得到了这个错误
Unzipping /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6-bin.zip to /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok
Set executable permissions for: /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6/bin/gradle
FAILURE: Build failed with an exception.
* What went wrong:
Failed to notify model configuration listener.
> Could not resolve all dependencies for configuration ':runtime'.
> Could not resolve org.apache.ant:ant:1.8.2.
Required by:
:buildSrc:unspecified
> Could not GET 'http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.2/ant-1.8.2.pom'.
> peer not authenticated
> Could not GET 'http://repository.jboss.org/nexus/content/groups/public/org/apache/ant/ant/1.8.2/ant-1.8.2.pom'.
> peer not authenticated
> Could not resolve org.javassist:javassist:3.15.0-GA.
Required by:
:buildSrc:unspecified
> Could not GET 'http://repo1.maven.org/maven2/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.pom'.
> peer not authenticated
> Could not GET 'http://repository.jboss.org/nexus/content/groups/public/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.pom'.
> peer not authenticated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.359 secs
我只想知道如何将 git clone 作为 java 项目导入到我的 eclipse juno 中?我曾尝试为 Eclipse 安装 m2eclipse 插件,但没有成功。
PS:我在 ubuntu 12.04 并且我在代理防火墙内