[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] p2 remembering installation location after install directory is copied?

Remove the bundlePool attribute from your p2 director invocation. When you setup Eclipse with a bundle pool, the metadata contained within your installation will have an absolute path pointing to the location of the bundle pool, where all plugins will be installed.


- Konstantin



From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of David Nice
Sent: Monday, March 09, 2015 9:51 AM
To: p2-dev@xxxxxxxxxxx
Subject: [p2-dev] p2 remembering installation location after install directory is copied?


Hi all,

I'm confused about p2 having a very good memory! I'm using Eclipse 4.4.2. I provision our target platform, then I take a copy of our target platform to install our product into as a test bed. I install the Eclipse test framework into this copied version of Eclipse but the Eclipse test framework appears in the original Eclipse instance!

Is this behaviour expected?

An example of an ant script that recreated this behaviour follow.

Thanks in advance,


<?xml version="1.0" encoding="UTF-8" ?>
<project name="test" default="full">

        <property name="cache" value="file://home/niced/ies_442_zips/all" />
        <property name="target.dir" value="/tmp/target.dir" />
        <property name="copied.target.dir" value="/tmp/target.copy" />
        <property name="test.framework" value="file://home/niced/development/cicsexplorer_workspace_hermes/com.ibm.cics.explorer.build.common/eclipse-test-framework" />

        <target name="clean">
                <delete dir="${target.dir}" />
                <delete dir="${copied.target.dir}" />

        <target name="prepare.platform">
                <p2.director metadataRepository="${cache}" artifactRepository="${cache}"
                        destination="${target.dir}" bundlePool="${target.dir}"
                        profile="">"SDKProfile" os="linux" ws="gtk" arch="x86"
                        extraarguments="-profileProperties org.eclipse.update.install.features=true">

                        <!-- SDK -->
                        <iu id="org.eclipse.platform.ide" />
                        <iu id="org.eclipse.sdk.feature.group" />
                        <iu id="org.eclipse.rcp.configuration.feature.group" />

        <target name="copy.platform">
                <copy todir="${copied.target.dir}">
                        <fileset dir="${target.dir}" />

        <target name="install.feature">
                <!-- this should install the test framework into the eclipse at ${copied.target.dir} but
                                actually installs into ${target.dir} -->
                <p2.director metadataRepository="${test.framework}" artifactRepository="${test.framework}"
                        destination="${copied.target.dir}" bundlePool="${copied.target.dir}">
                        <iu id="org.eclipse.test.feature.group" />

        <target name="full" depends="clean, prepare.platform, copy.platform, install.feature" />

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU