Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » headless p2 director application
headless p2 director application [message #49920] Mon, 09 March 2009 18:09 Go to next message
Jesper Eskilson is currently offline Jesper EskilsonFriend
Messages: 134
Registered: July 2009
Senior Member
I have a ant build script which needs to run the p2 director application
in headless environment. This is how I try to do it:

>
> <target name="p2-install-feature">
> <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
> <arg value="-application" />
> <arg value="org.eclipse.equinox.p2.director.app.application" />
> <arg value="-metadataRepository" />
> <arg value="${p2.metadata.repo}" />
> <arg value="-artifactRepository" />
> <arg value="${p2.artifacts.repo}" />
> <arg value="-installIU" />
> <arg value="${p2.install.iu}" />
> <arg value="-version" />
> <arg value="${p2.feature.version}" />
> <arg value="-destination" />
> <arg value="${targetEclipse}" />
> <arg value="-profile" />
> <arg value="SDKProfile" />
> <arg value="-vmArgs" />
> <arg value="-Declipse.p2.data.area=${targetEclipse}/p2" />
> <classpath>
> <pathelement location=" ${hostEclipse}/eclipse/plugins/org.eclipse.equinox.launcher_ ${equinoxLauncherPluginVersion}.jar " />
> </classpath>
> </java>
> </target>

I previously used to run the director application using the "eclipse"
launcher, but that doesn't work to well when DISPLAY isn't set.

There are no visible problems when running the application, but
attempting to use the target application (${targetEclipse}) to run the
PDE build scripts fails complaining about missing plugins?

What could I be doing wrong?

--
/Jesper
Re: headless p2 director application [message #50110 is a reply to message #49920] Tue, 10 March 2009 19:28 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Jesper,
The -vmargs is an argument to the eclipse executable, it doesn't work
when launching java directly. Because you are using the <java> task,
you need to change it to be more like:

....
<arg value="-profile" />
<arg value="SDKProfile" />
<jvmarg value="-Declipse.p2.data.area=${targetEclipse}/p2" />

-Andrew
Jesper Eskilson wrote:
> I have a ant build script which needs to run the p2 director application
> in headless environment. This is how I try to do it:
>
>>
>> <target name="p2-install-feature">
>> <java classname="org.eclipse.equinox.launcher.Main"
>> fork="true" failonerror="true">
>> <arg value="-application" />
>> <arg
>> value="org.eclipse.equinox.p2.director.app.application" />
>> <arg value="-metadataRepository" />
>> <arg value="${p2.metadata.repo}" />
>> <arg value="-artifactRepository" />
>> <arg value="${p2.artifacts.repo}" />
>> <arg value="-installIU" />
>> <arg value="${p2.install.iu}" />
>> <arg value="-version" />
>> <arg value="${p2.feature.version}" />
>> <arg value="-destination" />
>> <arg value="${targetEclipse}" />
>> <arg value="-profile" />
>> <arg value="SDKProfile" />
>> <arg value="-vmArgs" />
>> <arg value="-Declipse.p2.data.area=${targetEclipse}/p2" />
>> <classpath>
>> <pathelement
>> location=" ${hostEclipse}/eclipse/plugins/org.eclipse.equinox.launcher_ ${equinoxLauncherPluginVersion}.jar "
>> />
>> </classpath>
>> </java>
>> </target>
>
> I previously used to run the director application using the "eclipse"
> launcher, but that doesn't work to well when DISPLAY isn't set.
>
> There are no visible problems when running the application, but
> attempting to use the target application (${targetEclipse}) to run the
> PDE build scripts fails complaining about missing plugins?
>
> What could I be doing wrong?
>
> --
> /Jesper
Re: headless p2 director application [message #593101 is a reply to message #49920] Tue, 10 March 2009 19:28 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
Jesper,
The -vmargs is an argument to the eclipse executable, it doesn't work
when launching java directly. Because you are using the <java> task,
you need to change it to be more like:

....
<arg value="-profile" />
<arg value="SDKProfile" />
<jvmarg value="-Declipse.p2.data.area=${targetEclipse}/p2" />

-Andrew
Jesper Eskilson wrote:
> I have a ant build script which needs to run the p2 director application
> in headless environment. This is how I try to do it:
>
>>
>> <target name="p2-install-feature">
>> <java classname="org.eclipse.equinox.launcher.Main"
>> fork="true" failonerror="true">
>> <arg value="-application" />
>> <arg
>> value="org.eclipse.equinox.p2.director.app.application" />
>> <arg value="-metadataRepository" />
>> <arg value="${p2.metadata.repo}" />
>> <arg value="-artifactRepository" />
>> <arg value="${p2.artifacts.repo}" />
>> <arg value="-installIU" />
>> <arg value="${p2.install.iu}" />
>> <arg value="-version" />
>> <arg value="${p2.feature.version}" />
>> <arg value="-destination" />
>> <arg value="${targetEclipse}" />
>> <arg value="-profile" />
>> <arg value="SDKProfile" />
>> <arg value="-vmArgs" />
>> <arg value="-Declipse.p2.data.area=${targetEclipse}/p2" />
>> <classpath>
>> <pathelement
>> location=" ${hostEclipse}/eclipse/plugins/org.eclipse.equinox.launcher_ ${equinoxLauncherPluginVersion}.jar "
>> />
>> </classpath>
>> </java>
>> </target>
>
> I previously used to run the director application using the "eclipse"
> launcher, but that doesn't work to well when DISPLAY isn't set.
>
> There are no visible problems when running the application, but
> attempting to use the target application (${targetEclipse}) to run the
> PDE build scripts fails complaining about missing plugins?
>
> What could I be doing wrong?
>
> --
> /Jesper
Previous Topic:Problem with pluginPath (headless build)
Next Topic:Headless Build and Debug Info
Goto Forum:
  


Current Time: Mon Jun 14 16:23:52 GMT 2021

Powered by FUDForum. Page generated in 0.01842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top