Hi,

I assume you try to build a plug-in-project? Sad but true, ant4eclipse 
currently doesn't read out the build.properties.

But when you're using the buildPlugin-task you can set a 
"globalCompilerSettings"-file to configure the compiler:

Example:

<buildPlugin packageAsJar="yes" workspace="d:/myworkspace"
projectname="my.plugin.project" destDir="d:/myplugins">
   <targetPlatform refid="eclipse-3.4"/>
   <eclipseLibraryCompiler
globalCompilerSettings="some-directory/org.eclipse.jdt.core.prefs"/>
</buildPlugin>

The file you specify must contain the compiler settings, as they are 
stored when you enable project-specific compiler settings in your 
Eclipse project (Eclipse saves them to a file 
".settings/org.eclipse.jdt.core.prefs" in the project). To set the 
compliance level, I think you should set at least the following to 
properties:

org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.source=1.5

(Of course you can set any other supported compiler-settings as well 
using this file).

As an alternative you can set "globalCompilerSettings" to your workspace 
root directory. In this case ant4eclipse reads the compiler settings 
from the workspace' .metadata-directory (i.e. it uses your 
workspace-wide settings you've specified in your Eclipse preferences).

Hope it helps !

Regards,
Nils





Florian Over schrieb:
> Hi
> following situation:
> We got the following errors:
> Syntax error, parameterized types are only available if source level is 1.5
> Everything is set to 1.5.
> 
> Scenario is a serverbuild with some dependencies on plugin projects.
> I tried everything but we always got this errors.
> I dont want to set the compiler in the project explicitly.
> 
> Is there a chance to set the target level for this?
> 
> I added the following lines to build.properties
> 
> javacSource=1.5
> javacTarget=1.5
> ant.build.javac.target=1.5
> ant.build.javac.source=1.5
> 
> Florian
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Ant4eclipse-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ant4eclipse-user

------------------------------------------------------------------------------
_______________________________________________
Ant4eclipse-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ant4eclipse-user

Reply via email to