Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] RE: Need help building a product with p2

I finally have the p2 director running and generating good data.
Unfortunately, I don't know what fixed it.  :)  The cmd line is exactly
the same.  I was getting JVM terminated dialogs after the p2 director
ran for a couple of minutes.  I rebooted my machine, installed RC3 (from
RC2), and tried again and got the JVM terminated once again.  Then I did
the same cmd line but also passed -clean.  It worked, and has been
working since!

More problems though.  I still can't get the product build to package
any org.eclipse stuff.  Maybe it's not supposed to?  I gave up that
route and decided to try using the Eclipse packager.  I copied the
template files and listed the features I was interested in.  It runs and
creates the zip file, but then I get this error:

BUILD FAILED
C:\Eclipse_3.4RC3\eclipse\plugins\org.eclipse.pde.build_3.4.0.v20080528\
scripts\
package.xml:86: The following error occurred while executing this line:
C:\Eclipse_3.4RC3\eclipse\plugins\org.eclipse.pde.build_3.4.0.v20080528\
scripts\
package.xml:51: The following error occurred while executing this line:
C:\testpackager3\workingPlace\package.all.xml:21: The following error
occurred w
hile executing this line:
C:\testpackager3\workingPlace\package.all.xml:15: The following error
occurred w
hile executing this line:
C:\Dev\Tommy\debug\eclipse\workspace\com.nokia.sdt.releng.tommybuilder\c
arbide.c
pp2\packager\customTargets.xml:16: The following error occurred while
executing
this line:
C:\testpackager3\workingPlace\package..win32.win32.x86.xml:1600:
C:\testpackager
3\workingPlace\tmp\eclipse\win32.win32.x86\eclipse not found.

The generated Ant script is referencing a directory it never created.
No idea why.


Another issue I've run into is the headless product build fails if I
include the generate.p2.metadata stuff in the build.properties file.  It
fails when trying to delete the tmp directory because some of the
plugins are in use.  The appear to still be in use by the p2 metadata
generator.  If I remove that stuff from the build.properties file it
build fine.  For now I'm going to just try to run the metadata generator
from the command line myself after the product build.

So just to make sure I'm on the right track, here's my current thinking
on how it should work.  Please correct me if I'm wrong.

1) Create an Eclipse install with whatever we need to do our builds and
whatever we want to package that's pre-built (platform, cvs, emf, gef,
etc.)
2) Use that install to build our product from the cmd line.  Our product
only lists our features (no org.eclipse.*).
3) Use the packager to pull out the features we want to package from the
Eclipse install in (1)
4) Create a complete product layout from (2) and (3)
5) Run the p2 metadata generator on (4)
6) Run the p2 director on (5), generating a p2 directory in (4)


Thanks,
Warren





------------------------------

Message: 3
Date: Sat, 31 May 2008 07:41:37 -0500
From: <Warren.Paul@xxxxxxxxx>
Subject: [equinox-dev] RE: Need help building a product with p2
To: <equinox-dev@xxxxxxxxxxx>
Message-ID:
	
<78988A0C817D8B4F9734DE8EFCEA6F67019A4CFC@xxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain;	charset="us-ascii"

Hi Andrew,

Changing the paths to URL's helped.  It now finds the product id
installIU, and takes a couple of minutes.  But it eventually comes back
with "Installation failed".  I wasn't sure what to put for profile.  I
assume PlatformProfile?  I tried that, SDKProfile, and remove the
profile option altogether.  I get the same error each time.  Is there a
way to get more details on what failed?  A verbose option perhaps?

Here's exactly how I'm invoking the director:

eclipsec.exe -nosplash -application
org.eclipse.equinox.p2.director.app.application -metadataRepository
file:C:\testproduct2\repository -artifactRepository
file:C:\testproduct2\repository -installIU com.nokia.carbide.cpp.product
-destination C:\testproduct2\eclipse -profile PlatformProfile
-profileProperties org.eclipse.update.install.features=true -bundlepool
C:\testproduct2\eclipse -p2.os win32 -p2.ws win32 -p2.arch x86 -roaming
-vmargs -Declipse.p2.data.area=C:\testproduct2\eclipse\p2


where C:\testproduct2\eclipse is where I exported the product to, and
C:\testproduct2\repository is what PDE generated for the product.

Thanks,
Warren


------------
Date: Fri, 30 May 2008 16:20:35 -0400
From: Andrew Niefer <aniefer@xxxxxxxxxx>
Subject: Re: [equinox-dev] Need help building a product with p2
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Message-ID:
	
<OFA0E574FE.7D42A298-ON85257459.00539CEC-85257459.006FBEE4@xxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"

Warren,

1) This is what I notice when I tried running your director command on a
product I exported:
-  the "-metadataRepository" and "-artifactRepository" values need to be
URLs: use "file:C:\testproduct\repository"
- I found I needed to specify -installIU to get anything out.  In this
case the IU is the product ID
- althrough not strictly necessary since the generated config.ini will
specify its location, you might want to put the p2.data.area in the same
folder as -destination.

My test product does not contain p2 bundles so I have not tried the
Software updates.





<Warren.Paul@xxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
05/29/2008 08:25 PM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
<equinox-dev@xxxxxxxxxxx>
cc

Subject
[equinox-dev] Need help building a product with p2






I've received some help from Andrew in this Bugzilla (
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226614) but I'm still
having 
problems so I thought I'd take it to the list rather than in that 
Bugzilla.
We've been shipping an IDE product based on Eclipse for a few years now.

The way we've built our product in the past is essentially this:
1) Download the platform runtime, EMF, GEF, etc.. from eclipse.org and 
extract them into a product layout directory. 
2) Checkout and tag our features and plugins 
3) Use headless feature build on all of our features, and extract the 
generated archives into the product layout directory.
4) Copy our modified version of config.ini, .eclipseproduct, etc. into
the 
product layout directory. 
5) Generate an update site based on the generated features/plugins. 
This gives us a full product layout for new installs, and allows users 
with older installs of our product to update to the new version using
the 
update site.
This process broke when we moved to Eclipse 3.4M6 when p2 was
introduced. 
I've come to discover that we weren't really building it in the ideal 
fashion to begin with, so I'm trying to do it the proper way so we can
get 
a properly p2-ized product layout and update site.
Andrew provided several useful links in that Bugzilla.  I've read about 
doing product builds, using the p2 meta generator and p2 director.  I've

also played with the examples from EclipseCon presentation.
Here are some of the problems I'm having: 
1) I created a .product file based on features.  I included our features

as well as those org.eclipse features that we bundle with.  When I
export 
it using the PDE product export from the UI, it generates a directory 
containing everything we need - all features and plugins (ours and 
org.eclipse.*), our branded launcher and ini file, .eclipseproduct file,

config.ini file, jre, etc..  It of course does not contain the p2 data 
though.  I told the exporter to generate a metadata repository which it 
did.  I think I'm then supposed to run it through the p2 director to get

the proper p2 directory.  I tried this, and it generated something, but
I 
get the error "Cannot launch the Update UI.  This installation has not 
been configured properly for Software Updates" when I try to go to 
Help->Software Updates.  I assume I didn't get the command line correct 
for the p2 director.  This is what I did:
eclipsec.exe -nosplash -application 
org.eclipse.equinox.p2.director.app.application -metadataRepository 
C:\testproduct\repository\ -artifactRepository
C:\testproduct\repository\ 
-destination C:\testproduct\eclipse\ -profile PlatformProfile 
-profileProperties org.eclipse.update.install.features=true -bundlepool 
C:\testproduct\eclipse -p2.os win32 -p2.ws win32 -p2.arch x86 -roaming 
-vmargs -Declipse.p2.data.area=C:\testproduct2\eclipse\p2
Any idea what I'm doing wrong?  I thought I should be passing -installIU

but wasn't sure what to pass with it.  I tried the product id but it 
errored out saying it couldn't find the IU.

2) What I did in 1) was really just a test because we'll need to build 
everything from the command line and not from the export wizard.  I
tried 
to build the product from the command line and kept getting an error
that 
org.eclipse.rcp could not be found.  I removed all org.eclipse.*
features 
from our product file and tried again.  Now it builds, and it generates 
the repo directory because I added the stuff to our build.properties
file 
as instructed:
generate.p2.metadata=true 
p2.metadata.repo = file:${buildDirectory}/repo 
p2.artifact.repo = file:${buildDirectory}/repo 
p2.metadata.repo.name = Carbide.c++ Metadata Repository 
p2.artifact.repo.name = Carbide.c++ Artifact Repository 
p2.flavor = tooling 
p2.publish.artifacts=true 
This repo directory only contains the two xml files though
(artifacts.xml 
and content.xml), unlike the product export which generated those as
well 
as binary, features and plugins directories.
The other issue is that none of the org.eclipse.* features/plugins are 
included.  This is presumably because they're no longer in the .product 
file, but I had to do that to get the build to work.  I tried creating a

master feature which just required all of our features and the
org.eclipse 
features, but still got the missing rcp error.  Note: in the example2
from 
the EclispeCon zip, it builds a product and does include the org.eclipse

stuff in the output.  This example is based on plugins rather than 
features.  This is the only meaningful difference I could see in the 
.product files.
I'm also confused about the topLevelElementType and topLevelElementId 
attributes in the build.properties files.  I couldn't find any 
documentation on these.  Ideally I'd put type=product and id=our product

id, and then I assume the installIU would be the product id?
Anyway, sorry for the long email, but I'm stuck and could really use
some 
help. 
Thanks, 
Warren 

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



------------------------------

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


End of equinox-dev Digest, Vol 37, Issue 45
*******************************************


Back to the top