Hi, this is most likely because ant4eclipse doesn't detect your eclipse platform environment correctly.
In Eclipse the runtime environment is configured with some osgi.* properties (as osgi.ws for the window system, osgi.os for your operating system etc). Normally, when you launch Eclipse, those properties are set automatically, matching perfectly with your operating system, your window system and so on. If those properties are *not* specified, Equinox tryes to "guess" them (for example by interpreting the java "os.name" system property). This "guessing" is used by ant4eclipse as well, and in your case the guess is probably wrong. (See http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html for a reference of the configuration options) The properties ant4eclipse uses when it tries to resolve the plug-in dependencies, are written to the log - search for "Initializing TargetPlatform with properties". Most probably the properties doesn't match the "Eclipse-PlatformFilter" specified in the Manifest of the launcher.gtk.linux.x86-plug-in. To set this properties explizitly set the following three properties using the ANT_OPTS environment variable before launching ant: export ANT_OPTS=-Dosgi.ws=gtk -Dosgi.os=linux -Dosgi.arch=x86 Please let me know if it helps! Regards, Nils Oleg Mikheev schrieb: > I'm trying to build an Eclipse plugin with ant4eclipse 0.5.0-RC1 > and Eclipse PDE 3.4 > This is what I get: > > ERROR - [ERROR] firstplugin/actions/SampleAction.java#35: The type > org.eclipse.swt.widgets.Shell cannot be resolved. It is indirectly > referenced from required .class files > > The main cause is inability to match platform filter. > There are lots of messages like this one: > > WARN - Could not resolve > 'org.eclipse.equinox.launcher.gtk.linux.x86_1.0.100.v20080606@/usr/local/eclipse_pde/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.100.v20080606': > WARN - Platform filter did not match: (& (osgi.ws=gtk) (osgi.os=linux) > (osgi.arch=x86)) > WARN - Missing Constraint: Fragment-Host: > org.eclipse.equinox.launcher; bundle-version="[1.0.0,1.1.0)" > > > I don't understand how come platform doesn't match? > This is my simple build.xml: > > <project name="FirstPlugin"> > <taskdef resource="net/sf/ant4eclipse/antlib.xml"/> > <property name="build.workspace" location="${basedir}/../"/> > <property name="build.dest" location="/tmp/q/"/> > <property name="plugin.id" value="FirstPlugin"/> > <property name="ant4eclipse.trace" value="true"/> > > <targetPlatform id="eclipse-32"> > <location dir="/usr/local/eclipse_pde"/> > </targetPlatform> > > <target name="build-plugin"> > <buildPlugin destDir="${build.dest}" projectName="${plugin.id}" > workspace="${build.workspace}" > packageasjar="true"> > <eclipselibrarycompiler /> > <targetplatform refid="eclipse-32"/> > </buildPlugin> > </target> > > </project> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Ant4eclipse-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ant4eclipse-user > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ant4eclipse-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ant4eclipse-user
