Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target Platform for PDE Headless build does not work

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

like image 312
Andreas Avatar asked Jul 06 '10 08:07

Andreas


1 Answers

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:

  1. baseLocation This is a path to an eclipse that is your target.
  2. 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.
  3. 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:
    1. The root of an eclipse-like install with plugins/ and features/ subfolders. This is a good way to provide the delta-pack instead of just unzipping it on top of an eclipse install.
    2. The root of a workspace-like folder, where all subfolders are treated as plugins or features depending on the presence of a manifest or feature.xml.
    3. The root of a bundle or feature, or the jar for a bundle.
  4. If you are doing a p2 build (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.
like image 65
Andrew Niefer Avatar answered Nov 06 '22 00:11

Andrew Niefer