Create Ant Build File for feature creates build.xml with broken dependencies [message #581996] |
Tue, 30 September 2008 11:26 |
Jesper Eskilson Messages: 134 Registered: July 2009 |
Senior Member |
|
|
Hi,
I'm trying to setup a headless build for a feature. I've managed to
build them using the antRunner, roughly following the instructions in
"Automatic Building of Features" in the PDE docs. The problem with that
approach is that it requires a substantial amount of infrastructure
around it to find the correct jars, build files, etc.
So I was hoping to be able to follow the instructions on "Generating Ant
scripts from PDE". I select the feature.xml, then chose "Create Ant
Build File", and a build.xml appears.
The first issue (and the major one) is that the build file does not seem
to resolve the plugin's dependencies (in this case
org.eclipse.dd.dsf.debug):
> ...
> [javac] 71. ERROR in /home/jesperes/dev/marran/core/ide/eclipse/plugins/com.iar.i de.debugger.dsf/src/com/iar/ide/debugger/dsf/service/CSpyMod ules.java (at line 83)
> [javac] public static class CSpyModuleDMData implements IModuleDMData {
> [javac] ^^^^^^^^^^^^^
> [javac] IModuleDMData cannot be resolved to a type
> ...
feature.xml contains all the necessary plugins, as far as I can see (the
plugin builds fine inside Eclipse, it's just the generated build.xml
file which is broken):
> ...
> <requires>
> <import plugin="org.eclipse.core.runtime" version="3.4.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.dd.dsf" version="1.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.dd.dsf.debug" version="1.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.cdt.launch" version="5.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.cdt" version="5.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.cdt.debug.core" version="5.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.cdt.core" version="5.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.debug.core" version="3.4.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.ui" version="3.4.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.ui.ide" version="3.4.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.debug.ui" version="3.4.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.dd.dsf.ui" version="1.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.dd.dsf.debug.ui" version="1.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.cdt.ui" version="5.0.0" match="greaterOrEqual"/>
> <import plugin="javax.xml"/>
> </requires>
> ...
My next task was to figure out how to do run the build.xml script from
the command line. The first issue here is that the generated build.xml
file contains a task eclipse.idReplacer, which my standalone does not have:
> <eclipse.idReplacer featureFilePath=" ${feature.base}/features/com.iar.ide.debugger.feature_1.0.0/ feature.xml " selfVersion="1.0.0" featureIds="" pluginIds=""/>
I can manually remove it, but I'd rather have a build.xml which I can
use out-of-the box. If I remove it, I get a bunch of error which seem to
indicate that I'm using a too old Java-compiler:
> [javac] /home/jesperes/dev/marran/core/ide/eclipse/plugins/com.iar.i de.debugger.dsf/src/com/iar/ide/debugger/dsf/Activator.java: 93: for-each loops are not supported in -source 1.3
> [javac] (use -source 5 or higher to enable for-each loops)
> [javac] for (ILaunch launch : DebugPlugin.getDefault().getLaunchManager()
> [javac] ^
Why doesn't the generated build.xml file pick up the Java compiler
settings from the project's settings? Anyway, if I call ant with
$ ant -DjavacSource=1.6 -DjavacTarget=1.6
then I get stuck on errors similar to what I described above; i.e. not
resolving the dependency on org.eclipse.dd.dsf.debug:
--
/Jesper
|
|
|
Powered by
FUDForum. Page generated in 0.03304 seconds