PDE Headless 构建的目标平台不起作用
我目前正在尝试让我的无头 pde 构建工作,但我陷入了一个我不知道如何继续的点。 问题是如何定义相关的目标平台来编译插件。 我有一个包含以下调用的 build.bat(全部在一行中!):
java -jar D:\target\eclipse\plugins\org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-application org.eclipse.ant.core.antRunner
-f D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_20100114\scripts\productBuild\productBuild.xml
-Dbuilder=c:\pde-build\scripts %*
我尝试从不同部分创建目标 eclipse 平台:所有组合中的 eclipse SDK、RCP SDK、Delta Pack、PDE-SDK,但没有一个效果很好。
我收到以下错误:
BUILD FAILED
D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_20100114\scripts\productBuild\productBuild.xml:18: Cannot fin
d ${eclipse.pdebuild.scripts}/build.xml imported from D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_2010011
4\scripts\productBuild\productBuild.xml
变量 ${eclipse.pdebuild.scripts} 未得到解析。我还尝试通过命令行提供此参数,但随后我收到了另一个关于缺少 svn 任务的错误,这绝对令人困惑,因为这是与我引用的本地 eclipse 安装一起使用的。
当我将 d:/target/eclipse 的路径替换为本地 Eclipse 安装时,pde 构建按预期工作! 这导致我的目标 Eclipse 的配置不正确,但目前我不知道如何配置它!
我的目标是首先在我的本地站点上自动构建 pde,而不引用我的本地 eclipse,然后将此构建过程集成到我们正在运行的 Cruisecontrol 实例中。
正如我已经看到的另一个关于定义目标日食的问题,如果有人能够提供有关该问题的提示或事实,我会很高兴。
问候, 安德烈亚斯
I am currently trying to get my headless pde-build working but I am stuck on a point where I do not know how to continue.
The problem is how to define the related target platform to compile the plugins against.
I have a build.bat with the following call (all in one line!):
java -jar D:\target\eclipse\plugins\org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-application org.eclipse.ant.core.antRunner
-f D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_20100114\scripts\productBuild\productBuild.xml
-Dbuilder=c:\pde-build\scripts %*
I tried to create the target eclipse platform from different parts: The eclipse SDK, RCP SDK, Delta Pack, PDE-SDK in all combinations but none of them worked well.
I got the following error:
BUILD FAILED
D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_20100114\scripts\productBuild\productBuild.xml:18: Cannot fin
d ${eclipse.pdebuild.scripts}/build.xml imported from D:\target\eclipse\plugins\org.eclipse.pde.build_3.5.2.R35x_2010011
4\scripts\productBuild\productBuild.xml
where the variable ${eclipse.pdebuild.scripts} does not got resolved. I also tried to give this parameter via the command line but then I got another error regarding missing svn task which is absolutely confusing as this is working with my local eclipse installation referenced.
When I replace the path from d:/target/eclipse to my local eclipse installation the pde build works as expected!
This leads my to the point that the configuration of the target eclipse is not correct but in the moment I have no idea how to configure this!
My goal is the automate the pde build first on my local site without referencing my local eclipse and later on integrate this building process into our running cruisecontrol instance.
As I saw already another question about defining the target eclipse I would be happy if anyone can contribute hints or facts regarding the problem.
Regards,
Andreas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
执行无头构建时,目标可以与实际运行构建本身的 Eclipse 分开。您在这里遇到的问题是您用来运行构建的 eclipse 没有正确安装 PDE/Build。
这就是为什么未设置
${eclipse.pdebuild.scripts}
的原因,因为 PDE/Build 未安装到该 eclipse 实例中,org.eclipse.pde.build 包未解析并且代码设置此属性从未被调用。同样,PDE/Build 任务所需的 ant 类路径条目也不会正确设置。您需要安装有 PDE 的 Eclipse 来运行构建,但构建的目标可以与此分开。
在
-Dbuilder=c:\pde-build\scripts
下的build.properties
文件中,您可以设置多个 属性:baseLocation
这是通往您目标日食的路径。buildDirectory
这是构建实际发生的地方,源代码被提取到plugins/和features/子文件夹中,但如果这里已经有二进制插件,那么它们也将成为目标的一部分。pluginPath
这是一个路径列表(在 Windows 上用“;”分隔,在 Linux 上用“:”分隔),其中包含应被视为目标一部分的其他位置。这些位置可以有多种:p2.gathering = true
)您还可以在${repoBaseLocation}
下提供 p2 存储库,该存储库将被转换并放置在${transformedRepoLocation}
并将成为您的目标的一部分,并且那里的 p2 元数据将获得 在构建期间重用。When performing a headless build, the target can be separate from the eclipse that is actually running the build itself. The problem you had here is that the eclipse that you were using to run the build did not have PDE/Build properly installed.
This is why the
${eclipse.pdebuild.scripts}
was not set, because PDE/Build was not installed into that eclipse instance, the org.eclipse.pde.build bundle was not resolved and the code that sets this property never got called. Similarly, the necessary ant classpath entries for PDE/Build tasks would not have been set up properly either.You need the Eclipse with PDE installed inside to run the build, but the target for the build can be separate from this.
In the
build.properties
file found under-Dbuilder=c:\pde-build\scripts
you can set several properties:baseLocation
This is a path to an eclipse that is your target.buildDirectory
This is where the build will actually take place, source is fetched to plugins/ and features/ subfolders, but if there are already binary plugins located here then those become part of the target as well.pluginPath
This is a list of paths (separated with ';' on windows or ':' on linux) containing other locations that should be considered as part of your target. These locations can be several things:p2.gathering = true
) you can also provide p2 repositories under a${repoBaseLocation}
which will be transformed and placed under${transformedRepoLocation}
and will become part of your target, and the p2 metadata there will get reused during the build.经过一段时间的调查,我发现到目前为止我做错了什么。正如我上面提到的,定义目标平台并不像将 SDK 和插件复制到一个位置那么容易(就像在 Eclipse 开发的早期那样)。
现在的工作解决方案如下:将 eclipse SDK 复制到目标位置并运行此版本。在其中安装必要的 PDE 工具以启用插件开发。之后,关闭 IDE 并将 delta pack + 相应的 svn 插件(我使用了来自 sourceforge 的 org.eclipse.pde.build.svn-1.0.1RC2)复制到目标平台中,就完成了。
现在我的自动化 PDE 构建正在按预期运行。
现在唯一的小问题如下:结果产品包含 Eclipse 特定的菜单条目,当我从 dev-eclipse 内部运行它时,这些菜单条目不存在。
有什么提示吗?
after some more time of investigation I found out, what I did wrong so far. As I mentioned above defining the target platform is not that easy as copying the SDK and plugins in into one location (as it was in early times of eclipse dev).
The working solution by now is the following: Copying the eclipse SDK into the target location and run this version. Install inside this the neccessary PDE-Tools to enable plugin development. After that, close the IDE and copy the delta pack + the respective svn plugin (I used org.eclipse.pde.build.svn-1.0.1RC2 from sourceforge) into the target platform and you're done.
Now my automated PDE build is running as expected.
Only minor issue now is the following: The result product contains eclipse-specific menu entries which are not there when I ran this from inside my dev-eclipse.
Any hints on that?
我刚刚发布了关于此类主题的问题的答案,也许这可以帮助您:
插件产品VS特色产品
I just posted an answer to my question on this kind of topics, may be this can help you:
Plugin product VS Feature product