I have a couple questions on p2.director. I'm doing headless build on
linux. When I run p2.director as the last step to make a p2-enabled
archive, it tries to access eclipse.org. Since I just built my sources, I
just want it to retrieve what was built from another directory. How do I
make it to only look in a certain directory locally for what it needs?
Also, I'm getting some errors unzipping jar files due to invalid zip file
format during the run. Here is a sample snippet.
!MESSAGE Error closing the output stream for org.junit4/osgi.bundle/4.3.1
java.io.IOException: Error unzipping /tmp/org.junit4_4.3.130706.jar:
Invalid zip file format
org.eclipse.equinox.internal.p2.artifact.repository.simple.S impleArtifactRepository$ZippedFolderOutputStream.close(Simpl eArtifactRepository.java:146)
at java.io.FilterOutputStream.close(FilterOutputStream.java:143 )
Here is what I did to build:
1. I added the following into buildConfigs/sdk/build.properties
2. copied buildConfigs/sdk/packager/sdk.product into buildDirectory and
modified @qualifier@ to "Test_Build". I also modified the postFetch step
in sdk's customTarger.xml so it doesn't use timestamp as qualifier for sdk
and platform archives. I'm not sure why it was set that way to begin with.
3. build. I use build.xml in eclipsebuilder. This generated the repo/*.xml
files and the simpleconfigurator directory under eclipse/configuration.
4. unzip the built archive to use as builder. run p2.director as follows.
eclipse_p2 is the new directory for the result.
I managed to get past the first part of my problems about trying to access
eclipse.org. Then I realized that most of the unzip failures were caused
by trying to unzip a folder. The artifacts.xml file somehow specified
those as application/zip while they're actually folders in my layout. Can
someone tell me where the info is generated from and what I could do to
correct it one way or another?
I don't think that the artifact repository supports folder shaped
artifacts. Everything in the artifact repo should be a jar. It will be
automatically unzipped into folder shape as appropriate at install time
according to the metadata. (via a zipped instruction on the IU).
> I managed to get past the first part of my problems about trying to
> access eclipse.org. Then I realized that most of the unzip failures were
> caused by trying to unzip a folder. The artifacts.xml file somehow
> specified those as application/zip while they're actually folders in my
> layout. Can someone tell me where the info is generated from and what I
> could do to correct it one way or another?
I'm really bummed about p2-izing a build. It can't be this difficult! I'm
only trying to build the 3.4.1 sources!
I started my build from scratch to get a clean start. The sources were
checked out of eclipse cvs (R3_4_1 tag) and put into our repository to be
checked out from there during my build. I updated maps files for the new
I built the sdk component with build.xml in eclipsebuilder. No
modifications to build.properties or anything.
After it's done I untar the archive and ran the following command line to
generate p2 metadata
In the eclipse_p2 folder, I got features, p2, and plugins folders but no
eclipse.exe or any other files that should be at that level. Also got the
verifying signature error I mentioned in the previous post.
Can someone tell me what's missing in my steps? Am I supposed to modify
something in the eclipse sources to have more info generated? I assumed
the sources were already set up properly to have everything needed for the
metadata generator and p2 director.