[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] How to include Eclipse platform in the product build?

Thanks Andrew,

I will try the P2 mirror task to generate the context repo my self. However I can only treat it a work-around for now. It's easy to make mistake of missing pieces in the mirroring. Proposal in bug 281409 is official way to distribute platform as reusable in other people's build, especially in their commercial product.

Regards,
Andy

Andrew Niefer wrote:

Since you are using "p2.gathering=true" you can add the requirements by creating a p2.inf beside your .product file.
(http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata).

Something like this:
 requires.1.namespace = org.eclipse.equinox.p2.iu
requires.1.name =
org.eclipse.platform.feature.group
requires.1.range = [
3.5.0, 3.6.0)
requires.1.greedy = true

This will add a requirement from your product to the platform feature.

You also need to get metadata and artifacts for the platform and everything it requires.  Unfortunately it there is no downloadable zipped repo for the platform.  (I raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=281409)

You can use the mirror ant task to get the metadata from different sources, here is an example that would extract it from your eclipse install and the rcp zipped repo.  But this is still missing some platform specific fragments.  You could consider mirroing from  http://download.eclipse.org/eclipse/updates/3.5 or http://download.eclipse.org/releases/galileo and then keep the context repo around for other builds.

 <p2.mirror>
        <source>
                   <repository kind="metadata" location="file:${base}/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile" />
                    <repository kind="artifact" location="file:${base}/eclipse" />
                <repository kind="artifact" location="file:${base}/eclipse/p2/org.eclipse.equinox.p2.core/cache" />
                    <fileset file="${base}/org.eclipse.rcp-p2repo-3.5.zip" />
        </source>
         <destination location="file:${base}/context" />
         <iu id="org.eclipse.platform.feature.group" />
 </p2.mirror>

Then, set "p2.context.repos=file:${base}/context" and PDE/Build will take care of ensuring they are available for the director.
There is a little doc on this here: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_p2_reusingmetadata.htm

-Andrew


Andy Jin <ajin@xxxxxxx>
Sent by: p2-dev-bounces@xxxxxxxxxxx

06/24/2009 03:25 PM

Please respond to
P2 developer discussions <p2-dev@xxxxxxxxxxx>

To
P2 developer discussions <p2-dev@xxxxxxxxxxx>
cc

Subject
[p2-dev] How to include Eclipse platform in the product build?







Our product has one top level feature which includes other components'
sub-features. The final product package needs to include the Eclipse
platform because it's a RCP product based on the platform. In my top
level feature I add the dependency on the Eclipse platform. And in my
product definition file, I include my top-level feature and Eclipse
platform feature.

Now I have problem running p2 director task when it is installing the
final product. P2 director can't find the Eclipse platform feature
group. In the "buildRepo" directory there is no platform
features/plugins generated by P2.

If I add Eclipse platform feature as "Included Features" in my top level
feature.xml, "buildRepo" directory has Eclipse platform so P2 director
is happy.

Is there any way to include Eclipse platform in the final product
package without adding it as "Included Features"?

I am using Galileo final release.


- This is my product build directory configuration:
<builderDirectory>/
                  build.properties
                  customTarget.xml
                  eclipseBase/eclipse - (this is the platform runtime,
CVS, help)
                  src/buildRepo - (p2.build.repo)
                  src/features
                  src/maps
                  src/plugins

- In the build.properties, I define:

product=${buildDirectory}/plugins/com.qnx.tools.ide.momentics/MyProduct.product
runPackager=true
p2.gathering=true
p2.flavor=MyProduct
p2.director.profile=""> archiveNamePrefix=myproduct
archivePrefix=eclipse
collectingFolder=${archivePrefix}
configs = win32, win32, x86 & linux, gtk, x86
allowBinaryCycles = true
buildDirectory=${builderDirectory}/src
buildType=I
buildId=${timestamp}
buildLabel=${buildType}.${buildId}
timestamp=${timestamp}
base=${builderDirectory}/eclipsebase
baseLocation=${base}/eclipse
baseos=linux
basews=gtk
basearch=x86
filteredDependencyCheck=false
resolution.devMode=false
skipBase=true
skipMaps=true
tagMaps=false
skipFetch=true

Thanks,
Andy
 
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev


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