[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: How to debug headless build

In the launch configuration, go to the JRE tab and make sure "Run in the same JRE as the workspace" is selected.

-Andrew

Joachim Kainz wrote:
Based on http://rcpquickstart.wordpress.com/2007/06/06/getting-started-with-pde-build/ I created a new build file that contains the following target:
<pre>
	&lt;target name="pde-build-eclipse" depends="init"&gt;
		&lt;ant antfile="${baseLocation}/plugins/org.eclipse.pde.build_${pdeBuildPluginVersion}/scripts/productBuild/productBuild.xml" /&gt;
	&lt;/target&gt;
</pre>

(The full file can be downloaded from http://jolira.com/getting-started-with-pde-build/).

When running from Eclipse this approach works until it hits the generateFeature target. During this target the build fails with the following message:

<pre>
BUILD FAILED
/home/jfk/workspace/build/build.xml:70: The following error occurred while executing this line:
/opt/eclipse/plugins/org.eclipse.pde.build_3.3.2.v20071019/scripts/productBuild/productBuild.xml:20: The following error occurred while executing this line:
/opt/eclipse/plugins/org.eclipse.pde.build_3.3.2.v20071019/scripts/productBuild/productBuild.xml:51: Problem: failed to create task or type eclipse.generateFeature
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
</pre>

When debugging it using Eclipse I can see that several of the properties that I expected to be set are not. Most of all, eclipse.running is not set, which surprises me, because I am running ant from within Eclipse.

My conclusion is that Debug As > Ant Build... actually does not run the org.eclipse.ant.core.antRunner class and does therefore not set the appropriate properties.

I was wondering if anyone has made the same observation and has maybe overcome this problem. It really would be great to be able to debug these build scripts from Eclipse...