[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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,

Dave

------------------------------
<?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>

        <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" />
                </p2.director>
        </target>

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

        <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" />
                </p2.director>
        </target>


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

</project>
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