java - 如何通过 Git 从源代码构建 Eclipse JDT Core?

标签 java eclipse git eclipse-jdt

我想通过 Git 从源代码构建 Eclipse JDT Core。天真地,我克隆了 git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git 并尝试运行 mvn validate(最基本的Maven phases) 来自 Git master 分支,但这失败并出现以下错误。

我是 Debian Linux 用户,安装了 Maven 3.0.5 和 JDK 1.7。

我有兴趣上课ASTParser ,它可以解析 Java 代码。我意识到构建 Eclipse 项目很困难,但我无法在网上的任何地方找到用于构建该项目的权威“食谱”页面。

在我的 Eclipse Juno 安装(更新到最新)中,这是我的 JDT 核心 JAR 文件:org.eclipse.jdt.core_3.8.3.v20130121-145325.jar。我尝试在此标记 (v20130121-145325) 上构建,但我遇到了类似的错误。

从 Git 分支 master 上的 mvn validate 登录:

kca@cwb:~/saveme/git/eclipse.jdt.core$ mvn validate
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.eclipse.jdt:org.eclipse.jdt.annotation:1.1.0-SNAPSHOT @ /home/kca/saveme/git/eclipse.jdt.core/org.eclipse.jdt.annotation/pom.xml
[INFO] Adding repository http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository
[INFO] Adding repository http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository
[INFO] Adding repository http://download.eclipse.org/rt/ecf/int7/site.p2
[INFO] Adding repository http://download.eclipse.org/rt/ecf/int7/site.p2
[INFO] Adding repository http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/8.1.10.v20130312
[INFO] Adding repository http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/8.1.10.v20130312
[INFO] Adding repository http://download.eclipse.org/modeling/emf/emf/updates/2.9/base/R201305280742
[INFO] Adding repository http://download.eclipse.org/modeling/emf/emf/updates/2.9/base/R201305280742
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/license
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/license
[INFO] Adding repository http://download.eclipse.org/egit/staging/v3.0.0.201305080800-m7
[INFO] Adding repository http://download.eclipse.org/egit/staging/v3.0.0.201305080800-m7
[INFO] Adding repository http://download.eclipse.org/tools/ajdt/aspectj/update/e42
[INFO] Adding repository http://download.eclipse.org/tools/ajdt/aspectj/update/e42
[INFO] Resolving dependencies of MavenProject: org.eclipse.jdt:org.eclipse.jdt.annotation:1.1.0-SNAPSHOT @ /home/kca/saveme/git/eclipse.jdt.core/org.eclipse.jdt.annotation/pom.xml
[INFO] Resolving class path of MavenProject: org.eclipse.jdt:org.eclipse.jdt.annotation:1.1.0-SNAPSHOT @ /home/kca/saveme/git/eclipse.jdt.core/org.eclipse.jdt.annotation/pom.xml
[INFO] Computing target platform for MavenProject: org.eclipse.jdt:org.eclipse.jdt.compiler.tool:1.0.200-SNAPSHOT @ /home/kca/saveme/git/eclipse.jdt.core/org.eclipse.jdt.compiler.tool/pom.xml
[INFO] Resolving dependencies of MavenProject: org.eclipse.jdt:org.eclipse.jdt.compiler.tool:1.0.200-SNAPSHOT @ /home/kca/saveme/git/eclipse.jdt.core/org.eclipse.jdt.compiler.tool/pom.xml
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: org.eclipse.jdt.compiler.tool 1.0.200.qualifier
[ERROR]   Missing requirement: org.eclipse.jdt.core 3.9.0.qualifier requires 'bundle org.eclipse.text [3.1.0,4.0.0)' but it could not be found
[ERROR]   Cannot satisfy dependency: org.eclipse.jdt.compiler.tool 1.0.200.qualifier depends on: bundle org.eclipse.jdt.core [3.3.0,4.0.0)
[ERROR] 
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from org.apache.ant 1.8.2.v201303080311 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.apache.ant 1.8.3.v201303080312 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.apache.ant 1.8.4.v201303080030 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.text [3.1.0,4.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.runtime [3.3.0,4.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.filesystem [1.0.0,2.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.resources [3.3.0,4.0.0).", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from org.apache.ant 1.8.2.v201303080311 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.apache.ant 1.8.3.v201303080312 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.apache.ant 1.8.4.v201303080030 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.text [3.1.0,4.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.runtime [3.3.0,4.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.filesystem [1.0.0,2.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.resources [3.3.0,4.0.0).", "No solution found because the problem is unsatisfiable."]
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from org.apache.ant 1.8.2.v201303080311 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.apache.ant 1.8.3.v201303080312 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.apache.ant 1.8.4.v201303080030 to bundle org.eclipse.osgi 0.0.0.", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.text [3.1.0,4.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.runtime [3.3.0,4.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.filesystem [1.0.0,2.0.0).", "Unable to satisfy dependency from org.eclipse.jdt.core 3.9.0.qualifier to bundle org.eclipse.core.resources [3.3.0,4.0.0).", "No solution found because the problem is unsatisfiable."]
        at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98)
        at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)
        at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63)
        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:126)
        at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:81)
        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:374)
        at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:350)
        at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109)
        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:82)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        ... 11 more
[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/InternalErrorException

最佳答案

运行

mvn -P build-individual-bundles package 来自 eclipse.jdt.core 文件夹。

关于java - 如何通过 Git 从源代码构建 Eclipse JDT Core?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16943750/

相关文章:

java - TomEE 中的 Spring JDBCTemplate 偶尔出现 "Failed to validate a newly established connection"SQL 异常

java - JDK 1.8 无法与 IntelliJ IDEA 15.0.2 一起使用 "Error: Abnormal build process termination"

java - 如何修复 build.gradle 文件中的依赖项

android - 在 Eclipse 下进行 Android JNI/NDK 调试,为什么我的断点被忽略了?

git - 在 Git 中使用替代差异算法

Git:为发布选择更改的子集

java - 添加第三个项目后临时数组不起作用

java - OPCUA Milo 错误,UaException : status=Bad_ConnectionRejected

android - 我应该在公共(public) GitHub 存储库中包含 build.gradle 文件吗?

加载运行时工作台时 Eclipse 崩溃