简体   繁体   English

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

[英]How to build Eclipse JDT Core from source code via Git?

I want to build Eclipse JDT Core from source code via Git. 我想通过Git从源代码构建Eclipse JDT Core。 Naïvely, I cloned git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git and tried to run mvn validate (the most basic of Maven phases) from the Git master branch but this failed with errors below. Naïvely,我克隆了git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git并试图从Git master分支运行mvn validate (最基本的Maven阶段)但是这个失败了,下面有错误。

I am a Debian Linux user with Maven 3.0.5 and JDK 1.7 installed. 我是安装了Maven 3.0.5和JDK 1.7的Debian Linux用户。

I am interested to hack on class ASTParser , which can parse Java code. 我有兴趣破解类ASTParser ,它可以解析Java代码。 I realise building Eclipse projects is hard, but I cannot find the definitive "recipe" page anywhere on the Net for building this project. 我意识到构建Eclipse项目很难,但我无法在网络上的任何地方找到确定的“配方”页面来构建这个项目。

In my Eclipse Juno installation (updated to latest), this is my JDT Core JAR file: org.eclipse.jdt.core_3.8.3.v20130121-145325.jar . 在我的Eclipse Juno安装中(更新到最新版本),这是我的JDT Core JAR文件: org.eclipse.jdt.core_3.8.3.v20130121-145325.jar I tried to build on this tag ( v20130121-145325 ), but I get a similar error. 我试图建立这个标签( v20130121-145325 ),但我得到了类似的错误。

Log from mvn validate on Git branch master : 从Git branch 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

Run

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Eclipse JDT 插件从 Java 源代码中提取方法主体 - Extracting Method Body from Java Source Code with Eclipse JDT Plugin 如何在eclipse本地安装jdt.core? - How to install jdt.core in eclipse locally? 如何使用 Eclipse JDT Core 重新定义导入 - How to redefine an import using Eclipse JDT Core 未找到org.eclipse.jdt.core.dom.InfixExpression源 - org.eclipse.jdt.core.dom.InfixExpression source not found 如何使用JDT修改源代码? - How to modify source code using JDT? 如何从所有节点的Eclipse JDT Parser的java解析源中获取行和/或列? - How to obtain line and/or column from parsed java source from Eclipse JDT Parser from all nodes? Java源代码生成:Eclipse JDT AST vs CodeModel - Java source code generation: Eclipse JDT AST vs CodeModel 如何从Eclipse JDT Parser的已解析Java源代码获取行? - How get line from parsed java source from Eclipse JDT Parser? 如何关闭或删除 - org.eclipse.jdt.core.compiler.release=disabled from .settings - How turn off or removed - org.eclipse.jdt.core.compiler.release=disabled from .settings 如何通过eclipse菜单中的“ Eclipse Marketplace”或“ Install New Software”选项安装eclipse源代码? - How to install the eclipse source code via “Eclipse Marketplace” or “Install New Software” option from eclipse menu?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM