Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » p2-enabled product build hangs on mirroring tasks, only when run via CI server
p2-enabled product build hangs on mirroring tasks, only when run via CI server [message #547870] Mon, 19 July 2010 23:14
Troy Nichols is currently offline Troy NicholsFriend
Messages: 28
Registered: July 2009
Junior Member
Hi all,

I have a p2-enabled product build that runs fine when I run the build
via command line, but fails on the CI server, just hanging up any time
it gets to a p2 mirror task (e.g. p2.mirror). As a workaround, I have
tried to use different tasks to avoid using p2.mirror, but it appears
the offending code still gets called behind the scenes if not explicitly
doing a p2.mirror task, e.g. when doing transformRepo.

The build was based on this example (somewhat older but I think still
valid) from Andrew Niefer's blog:

http://aniefer.blogspot.com/2009/07/composing-and-updating-c ustom-eclipse.html

This issue sounds a little like something mentioned in the comments
section, where Andrew suggests not using zipped repositories, but
expanding them first. I have also tried this, but still run into the
same problem.

The CI server I'm using is Zutubi Pulse, (seen the problem in version
1.2.x and 2.1.x of Pulse), building on a Windows 2003 system. I can't
think of what would be different between the server build and a manual
command line build (but it's obviously something), or why I'm getting
this behavior or just "getting stuck" without any errors or anything.

I did some debugging in the p2 code for the p2.mirror task, and found
that that eventually gets us to some code in the bundle:
org.eclipse.ecf.provider.filestransfer,
in the class:
org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetri eveFileTransfer,
at the method:
setupProxies().
When it tries to do ProxySetupHelper.getProxies() (line 956 in mine), it
just hangs up - FOREVER. If I suspend the VM at that point, we're
always at ClassLoader.NativeLibrary.load() (of course you can't see
anything in there because there's no debug info on rt.jar).

Anyone experienced anything remotely like this? Unfortunately I don't
have any better advice on how to reproduce except to say that, "it
happens on my CI server..." Sorry...

Please let me know if anybody has any debugging tricks to get to the
bottom of this...what a pain this is...


Here is what my main build script looks like, if this helps:


<project name="IDS Product Build" default="main">

<property file="${basedir}/../config/versions.properties" />
<property file="downloadUrls.properties" />

<target name="getDownloads">
<mkdir dir="${downloadFolder}" />
<mkdir dir="${downloadFolder}/toTransform" />

<!-- 3rd party dependencies -->
<get usetimestamp="true" dest="${downloadFolder}/jdt.zip"
src="${jdturl}" />
<get usetimestamp="true" dest="${downloadFolder}/pde.zip"
src="${pdeurl}" />
<get usetimestamp="true" dest="${downloadFolder}/emf.zip"
src="${emfurl}" />
<get usetimestamp="true" dest="${downloadFolder}/gmf.zip"
src="${gmfurl}"/>
<get usetimestamp="true" dest="${downloadFolder}/gef.zip"
src="${gefurl}" />
<get usetimestamp="true" dest="${downloadFolder}/wst.zip"
src="${wsturl}" />
<get usetimestamp="true" dest="${downloadFolder}/jst.zip"
src="${jsturl}" />
<get usetimestamp="true" dest="${downloadFolder}/emfxaction.zip"
src="${emfxaction}" />
<get usetimestamp="true" dest="${downloadFolder}/emfvalidation.zip"
src="${emfvalidation}" />
<get usetimestamp="true" dest="${downloadFolder}/emfcompare.zip"
src="${emfcompare}" />
<get usetimestamp="true" dest="${downloadFolder}/mdtocl.zip"
src="${mdtocl}" />
<get usetimestamp="true" dest="${downloadFolder}/mdtuml2.zip"
src="${mdtuml2}" />
<get usetimestamp="true" dest="${downloadFolder}/m2mqvtoml.zip"
src="${m2mqvtoml}" />

<!-- IDS branding -->
<get usetimestamp="true" dest="${downloadFolder}/ids.zip"
src="${idsurl}" />

<!-- we will use the platform.zip as our base, so put it separately to
be transformed -->
<get usetimestamp="true" dest="${downloadFolder}/platform.zip"
src="${platformurl}" />
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishGMF">
<unzip src="${downloadFolder}/gmf.zip" dest="${downloadFolder}/gmf" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/gmf/eclipse/features"
includes="*"/>
<bundles dir="${downloadFolder}/gmf/eclipse/plugins"
includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishGEF">
<unzip src="${downloadFolder}/gef.zip"
dest="${downloadFolder}/gef" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/gef/eclipse/features"
includes="*"/>
<bundles dir="${downloadFolder}/gef/eclipse/plugins"
includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishEMF">
<unzip src="${downloadFolder}/emf.zip" dest="${downloadFolder}/emf" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/emf/features" includes="*"/>
<bundles dir="${downloadFolder}/emf/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishEMFTransaction">
<unzip src="${downloadFolder}/emfxaction.zip"
dest="${downloadFolder}/emfxaction" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features
dir="${downloadFolder}/emfxaction/eclipse/features" includes="*"/>
<bundles
dir="${downloadFolder}/emfxaction/eclipse/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishEMFValidation">
<unzip src="${downloadFolder}/emfvalidation.zip"
dest="${downloadFolder}/emfvalidation" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features
dir="${downloadFolder}/emfvalidation/eclipse/features" includes="*"/>
<bundles
dir="${downloadFolder}/emfvalidation/eclipse/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishMdtOcl">
<unzip src="${downloadFolder}/mdtocl.zip"
dest="${downloadFolder}/mdtocl" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features
dir="${downloadFolder}/mdtocl/eclipse/features" includes="*"/>
<bundles dir="${downloadFolder}/mdtocl/eclipse/plugins"
includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishMdtUml2">
<unzip src="${downloadFolder}/mdtuml2.zip"
dest="${downloadFolder}/mdtuml2" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features
dir="${downloadFolder}/mdtuml2/eclipse/features" includes="*"/>
<bundles
dir="${downloadFolder}/mdtuml2/eclipse/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishM2MQvtoml">
<unzip src="${downloadFolder}/m2mqvtoml.zip"
dest="${downloadFolder}/m2mqvtoml" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features
dir="${downloadFolder}/m2mqvtoml/eclipse/features" includes="*"/>
<bundles
dir="${downloadFolder}/m2mqvtoml/eclipse/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishEMFCompare">
<unzip src="${downloadFolder}/emfcompare.zip"
dest="${downloadFolder}/emfcompare" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features
dir="${downloadFolder}/emfcompare/eclipse/features" includes="*"/>
<bundles
dir="${downloadFolder}/emfcompare/eclipse/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishJST">
<unzip src="${downloadFolder}/jst.zip" dest="${downloadFolder}/jst" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/jst/features" includes="*"/>
<bundles dir="${downloadFolder}/jst/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishJDT">
<unzip src="${downloadFolder}/jdt.zip"
dest="${downloadFolder}/jdt" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/jdt/features" includes="*"/>
<bundles dir="${downloadFolder}/jdt/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishIDS">
<unzip src="${downloadFolder}/ids.zip"
dest="${downloadFolder}/ids" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/ids/features"
includes="*"/>
<bundles dir="${downloadFolder}/ids/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishPDE">
<unzip src="${downloadFolder}/pde.zip"
dest="${downloadFolder}/pde" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/pde/features"
includes="*"/>
<bundles dir="${downloadFolder}/pde/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- publish p2 metadata, mirror to build-time repo -->
<target name="publishWST">
<unzip src="${downloadFolder}/wst.zip"
dest="${downloadFolder}/wst" />
<p2.publish.featuresAndBundles repository="${p2.build.repo}">
<features dir="${downloadFolder}/wst/features"
includes="*"/>
<bundles dir="${downloadFolder}/wst/plugins" includes="*"/>
</p2.publish.featuresAndBundles>
</target>

<!-- extract the platform repo zip to a location where it can be -->
<!-- transformed into native runnables (creates .exe etc) -->
<!-- later during the product build -->
<target name="extractPlatformRepo">
<mkdir dir="${downloadFolder}/toTransform/platform" />
<unzip src="${downloadFolder}/platform.zip"
dest="${downloadFolder}/toTransform/platform" />
</target>

<target name="main" depends="clean">
<tstamp/>
<property name="timestamp" value="${DSTAMP}${TSTAMP}" />

<property name="downloadFolder" value="${basedir}/downloads" />
<antcall target="getDownloads"/>

<!-- Since Pulse doesn't seem to like p2 tasks that deal with zips, -->
<!-- first extract the platform repo from [downloads]/platform.zip -->
<!-- to [downloads]/toTransform -->
<antcall target="extractPlatformRepo"/>

<!-- some of theses are not p2 repos, so we'll publish the p2 metadata
ourselves -->
<property name="p2.build.repo"
value="file:${basedir}/buildDirectory/buildRepo"/>
<antcall target="publishGMF"/>
<antcall target="publishGEF"/>
<antcall target="publishEMF"/>
<antcall target="publishEMFTransaction"/>
<antcall target="publishEMFValidation"/>
<antcall target="publishMdtOcl"/>
<antcall target="publishMdtUml2"/>
<antcall target="publishM2MQvtoml"/>
<antcall target="publishEMFCompare"/>
<antcall target="publishJST"/>
<antcall target="publishJDT"/>
<antcall target="publishIDS"/>
<antcall target="publishPDE"/>
<antcall target="publishWST"/>

<property name="builder" value="${basedir}" />
<ant
antfile="${eclipse.pdebuild.scripts}/productBuild/productBuild.xml " />
</target>

<target name="clean">
<echo message="Cleaning buildDirectory..." />
<delete dir="${basedir}/buildDirectory" />
</target>
</project>
Previous Topic:How to get Bundle by package name ?
Next Topic:problem starting equinox from exported jar
Goto Forum:
  


Current Time: Fri Apr 19 11:45:26 GMT 2024

Powered by FUDForum. Page generated in 0.02760 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top