When setting up headless build in eclipse, you may encountered an error like:
C:\plugin-build\build-target-3.4.1\eclipse\plugins\org.eclipse.pde.build_3.4.1.R34x_v20080805\templates\headless-build\customTargets.xml:18: java.net.MalformedURLException: no protocol: ${eclipseBaseURL}
According to my solution, this is caused by a relative path when you invoke antRunner. For exmaple, if you use a relative path to set the builder:
-Dbuilder=pnstool
or
-Dbuilder=../pnstool
Then the error will appears. If you use an absolute path, the error will be fixed. An example is below:
java -jar %ECLIPSE_HOME%/startup.jar -application org.eclipse.ant.core.antRunner -buildfile %ECLIPSE_HOME%/plugins/org.eclipse.pde.build_3.4.1.R34x_v20080805/scripts/build.xml -Dbuilder=c:/plugin-build/pnstool