Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-build-dev] Headless build cannot resolve classes in org.eclipse.swt.widgets

Hello all,
 
I am making progress with the headless build but am encountering one strange compile error.
Here is the scenario:
 
Start eclipse (3.1.1 Release, CDT 3.0.1 also installed, Win XP) as headless antRunner:
 
java -jar startup.jar -data D:\Projekt\RTP\ws-ant-debug -application org.eclipse.ant.core.AntRunner
-buildfile D:\Projekt\RTP\ws-ant-debug\com.siemens.ad.rtp.build\scripts\build.xml
-Dbuilder=D:\Projekt\RTP\ws-ant-debug\com.siemens.ad.rtp.build\scripts
-DbuildDirectory=D:\Projekt\RTP\ant-export
 
The buildfile and genericTargets.xml were copied unmodified from org.eclipse.pde.build/scripts to the builder directory. Additionally the builder directory contains the attached customTargets.xml and build.properties. I had to do some unusual stuff with the fetch targets because our sources are not stored in CVS. Instead I am copying them from someplace. I don't think this is an issue here.
 
The feature I am building contains two plug-ins, one that we did from scratch, and another from CDT which we are planning to patch. They both get built as desired except that the compiler gives error messages:
 
(Self-made plugin)
=============snip 1============
    [javac] Compiling 15 source files to D:\Projekt\RTP\ant-export\plugins\com.siemens.ad.rtp.telnetconsole\temp.folder\telnetconsole.jar.bin
    [javac] ----------
    [javac] 1. ERROR in D:\Projekt\RTP\ant-export\plugins\com.siemens.ad.rtp.telnetconsole\src\com\siemens\ad\rtp\telnetconsole\TelnetProcess.java
    [javac]  (at line 144)
    [javac]  PlatformUI.getWorkbench().getDisplay().syncExec(refresher);
    [javac]  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The type org.eclipse.swt.widgets.Display cannot be resolved. It is indirectly referenced from required .class files
    [javac] ----------
    [javac] 1 problem (1 error)
    [javac] Compilation failed. Compiler errors are available in D:\Projekt\RTP\ant-export\plugins\com.siemens.ad.rtp.telnetconsole\temp.folder\telnetconsole.jar.bin.log
    [javac] Compile failed; see the compiler error output for details.
=============snap 1============
 
(CDT based plugin)
=============snip 1============
    [javac] Compiling 49 source files to D:\Projekt\RTP\ant-export\plugins\org.eclipse.cdt.managedbuilder.ui\temp.folder\mgdbuildui.jar.bin
    [javac] ----------
    [javac] 1. ERROR in D:\Projekt\RTP\ant-export\plugins\org.eclipse.cdt.managedbuilder.ui\src-mgdbuildui\org\eclipse\cdt\managedbuilder\internal\ui\ToolsSettingsBlock.java
    [javac]  (at line 116)
    [javac]  private class PageLayout extends Layout {
    [javac]                                   ^^^^^^
    [javac] The type org.eclipse.swt.widgets.Layout cannot be resolved. It is indirectly referenced from required .class files
    [javac] ----------
    [javac] 1 problem (1 error)
    [javac] Compilation failed. Compiler errors are available in D:\Projekt\RTP\ant-export\plugins\org.eclipse.cdt.managedbuilder.ui\temp.folder\mgdbuildui.jar.bin.log
     [copy] Copying 1 file to D:\Projekt\RTP\ant-export\plugins\org.eclipse.cdt.managedbuilder.ui\temp.folder\mgdbuildui.jar.bin
    [javac] Compile failed; see the compiler error output for details.
=============snap 1============
 
The "missing" classes are in the platform-specific fragment org.eclipse.swt.win32.win32.x86_3.1.1.jar which contributes to org.eclipse.swt_3.1.0.jar.
 
I am also attaching manifest and plugin.xml files for these two plug-ins,  neatly packaged in zip-files. Any more info I can supply?
 
Needless to say, the export of "my" plug-ins from the eclipse workbench functions without any problems. It is only in headless mode that there are difficulties.
 
 
Thanks for looking at this,
 
 
Norbert
 

Attachment: build.properties
Description: build.properties

<project name="Custom Targets">
	<target name="preSetup">
		<echo>preSetup - cleaning up.</echo>
		<delete includeemptydirs="true">
			<fileset dir="${buildDirectory}" includes="**/*"></fileset>
		</delete>
	</target>
	<target name="postSetup">
		<echo>postSetup - nothing to do.</echo>
	</target>
	<target name="preFetch">
		<echo>preFetch - nothing to do.</echo>
	</target>
	<target name="postFetch">
		<echo>postFetch - working ...</echo>
		<echo>- basedir ${basedir}</echo>
		<mkdir dir="${buildDirectory}/features"/>
		<mkdir dir="${buildDirectory}/plugins"/>
		<copy todir="${buildDirectory}/features/com.siemens.ad.rtp.build.feature"> 
			<fileset dir="${workspace}/com.siemens.ad.rtp.build.feature"></fileset>
		</copy>
		<copy todir="${buildDirectory}/plugins/com.siemens.ad.rtp.telnetconsole"> 
			<fileset dir="${workspace}/com.siemens.ad.rtp.telnetconsole" excludes="**/bin/*"></fileset>
		</copy>
		<copy todir="${buildDirectory}/plugins/org.eclipse.cdt.managedbuilder.ui"> 
			<fileset dir="${workspace}/org.eclipse.cdt.managedbuilder.ui" excludes="**/bin/*"></fileset>
		</copy>
	</target>
	<target name="preGenerate">
		<echo>preGenerate - nothing to do.</echo>
	</target>
	<target name="postGenerate">
		<echo>postGenerate - nothing to do.</echo>
	</target>
	<target name="preProcess">
		<echo>preProcess - nothing to do.</echo>
	</target>
	<target name="postProcess">
		<echo>postProcess - nothing to do.</echo>
	</target>
	<target name="preAssemble">
		<echo>preAssemble - nothing to do.</echo>
	</target>
	<target name="postAssemble">
		<echo>postAssemble - nothing to do.</echo>
	</target>
	<target name="postBuild">
		<echo>postBuild - nothing to do.</echo>
	</target>
	
	<condition property="supported.by.allelements">
		<or>
			<equals arg1="${target}" arg2="generateScript" casesensitive="false"/>
			<equals arg1="${target}" arg2="processElement" casesensitive="false"/>
			<equals arg1="${target}" arg2="assembleElement" casesensitive="false"/>
		</or>
	</condition>
	<target name="allElements">
		<echo>allElements - Calling genericTargets for ${target}</echo>
		<antcall target="someElements"></antcall>
	</target>
	<target name="someElements" if="supported.by.allelements">
		<echo>- executing someElements for
			antfile = ${genericTargets},
			target = ${target}
		</echo>
		<ant antfile="${genericTargets}" target="${target}" >
			<property name="type" value="feature" />
			<property name="id" value="com.siemens.ad.rtp.build.feature" />
		</ant>
	</target>
		
	<target name="getMapFiles">
		<echo message="No need for map files"/>
	</target>
	<target name="assemble.com.siemens.ad.rtp.build.feature.win32.win32.x86">
	  <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
		<property name="zipargs" value="" />
	  </ant>
	</target>
	<target name="assemble.com.siemens.ad.rtp.build.feature.linux.gtk.x86">
	  <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
		<property name="zipargs" value="" />
	  </ant>
	</target>
</project>

Attachment: managedbuilderinfo.zip
Description: managedbuilderinfo.zip

Attachment: telnetconsoleinfo.zip
Description: telnetconsoleinfo.zip


Back to the top