Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
re: [pde-dev] Eclipse 3.4 director issue - an easier way to run the director

Here's how I run the p2.director:

<java jar="${p2.director.launcher.jar}"
  fork="true"
  timeout="10800000"
  jvm="${PACK200_JAVA_HOME}/bin/java"
  failonerror="true"
  maxmemory="512m"
  taskname="p2.dir">
  <classpath>
<fileset dir="${p2.director.launcher.jar.dir}" includes="org.eclipse.equinox.launcher_*.jar" />
    <pathelement location="${p2.director.launcher.jar.dir}" />
  </classpath>
  <arg line=" -application ${p2.director.application}" />
  <arg line=" -nosplash -consoleLog" />
<arg line=" -flavor tooling -roaming -profile SDKProfile ${p2.director.installIU.cmd}" /> <arg line=" -destination ${p2.director.destination} -bundlepool ${p2.director.bundlepool}" /> <arg line=" -metadataRepository ${p2.director.input.repo.cleaned},${p2.director.metadataRepository}" /> <arg line=" -artifactRepository ${p2.director.input.repo.cleaned},${p2.director.artifactRepository}" /> <arg line=" -profileProperties org.eclipse.update.install.features=true" />
  <arg line=" ${p2.director.extraArgs}" />
  <arg line=" ${baseoswsarch}" />
<arg line=" -vmargs -Declipse.p2.data.area=${p2.director.destination}/p2 -Declipse.p2.MD5Check=false" />
  <arg line=" ${p2.director.extraVmArgs}" />
</java>

${p2.director.application} is either org.eclipse.equinox.p2.director (eclipse 3.5) or the now deprecated org.eclipse.equinox.p2.director.app.application (eclipse 3.4).

Or, even easier...

I have a wrapper to call the director with just a few properties required (it also adds support for http://path/to/some/update.zip, but works with local and remote unpacked repos, and local repo zips too):

<ant target="run.director" antfile="${helper}">
  <property name="p2.director.installType" value="IU" />
<property name="p2.director.installIU" value="${mainFeatureToBuildID}.feature.group" /> <property name="p2.director.input.repo" value="http://path/to/some/update.zip"; />
  <property name="p2.director.destination" value="${target-dir}" />
</ant>

where ${helper} is a pointer to this script [1] here:

[1]http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.common.releng/tools/scripts/buildAllHelper.xml?root=Technology_Project&view=markup

I think what you might be missing is -bundlepool, or else your eclipse.p2.data.area setting is being passed to java, not to the director.

N

On 02/04/2010 10:15 AM, Mark Russell wrote:
I'm trying to use director (from eclipse 3.4) to install code into a
Eclipse 3.4 SDK. I have ant code that unzips the new Eclipse 3.4 into a
temp directory. then I run the director to install my code (that I have
already created an update site and run the generate P2 metadata on it).

so when I run this I have a target eclipse that I'm going to install
into ( I actually have two target eclipse I'm going to install into
Linux and Win32). I have the runtime eclipse that I am going to run the
director from. let's take the Linux example

I have the target eclipse in
/home/markr/Build/OpenArbor/temp/openArbor-working-linux/eclipse
I have the runtime Eclipse in
/home/markr/Build/OpenArbor/temp/working/eclipse

I make my call to director to install my code into the target eclipse
and it runs with out errors. However there is one issue. My code is
installed in the working eclipse not the target eclipse.

here is my ant code:
<java classname="org.eclipse.equinox.launcher.Main"
classpath="${eclipse.launcher.jar}"
output="@{logFull}" failonerror="false" resultproperty="@{resultProperty}"
jvm="/usr/java/jdk-1.6/bin/java" fork="true" taskname="Install">
<jvmarg value="-Xms64M"/>
<jvmarg value="-Xmx256M"/>
<jvmarg value="-Declipse.p2.data.area=@{targetBase}/p2" />
<arg value="-consolelog" />
<arg value="-debug" />
<arg value="-application" />
<arg value="org.eclipse.equinox.p2.director.app.application" />
<arg value="-metadataRepository" />
<arg value="file://${build.out}/update/" />
<arg value="-artifactRepository" />
<arg value="file://${build.out}/update/" />
<arg value="-installIU" />
<arg value="@{featureName}" />
<arg value="-version" />
<arg value="${product.fullVersion}" />
<arg value="-destination" />
<arg value="@{targetBase}" />
<arg value="-profile" />
<arg value="SDKProfile" />
</java>

and here is the output of the ant run in verbose

[Install] Executing '/usr/java/jdk-1.6/bin/java' with arguments:
[Install] '-Xms64M'
[Install] '-Xmx256M'
[Install]
'-Declipse.p2.data.area=/home/markr/Build/OpenArbor/temp/openArbor-working-linux/eclipse/p2'

[Install] '-classpath'
[Install]
'/home/markr/Build/OpenArbor/temp/working/eclipse/plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar'

[Install] 'org.eclipse.equinox.launcher.Main'
[Install] '-consolelog'
[Install] '-debug'
[Install] '-application'
[Install] 'org.eclipse.equinox.p2.director.app.application'
[Install] '-metadataRepository'
[Install] 'file:///home/markr/Build/OpenArbor/product/update/'
[Install] '-artifactRepository'
[Install] 'file:///home/markr/Build/OpenArbor/product/update/'
[Install] '-installIU'
[Install] 'com.ddci.openarbor.application.feature.group'
[Install] '-version'
[Install] '3.4.0.201002040928'
[Install] '-destination'
[Install]
'/home/markr/Build/OpenArbor/temp/openArbor-working-linux/eclipse'
[Install] '-profile'
[Install] 'SDKProfile'
[Install]
[Install] The ' characters around the executable and arguments are
[Install] not part of the command.


from what I read this should tell director to install into
/home/markr/Build/OpenArbor/temp/openArbor-working-linux/eclipse

is there any way to turn on some tracing so I can see what is going on?

thanks in advance for you help.



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

--
Nick Boldt :: http://nick.divbyzero.com
Release Engineer :: Eclipse Modeling & Dash Athena


Back to the top