ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferrer, Eric" <eric.fer...@transcore.com>
Subject RE: Ant 1.6.5 , JDK 1.5 build error pointing to an apache class
Date Wed, 22 Mar 2006 21:46:28 GMT
I ran to this a while ago and it is not an ant question, but I have the
answer

Your ParamDataType.java probably extends Enum to provide you a C++ type
enum solution.  With 1.5 you have enum as a reserved word.  The fix is
to download a new version of commons-lang-2.1.jar which deprecates
com.apache.commons.lang.enum.Enum and provides you with a new version
com.apache.commons.lang.enumS.Enum

Just change your code to use that package once you set up the jar and
remove the old commons-lang jar.

You will get additional warnings regarding Generics but that is okay.

Good luck

-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com] 
Sent: Friday, March 17, 2006 8:29 PM
To: Ant Users List
Subject: Re: Ant 1.6.5 , JDK 1.5 build error pointing to an apache class

> [C:\builder\builds\fle\staging\src\com\myhome\ParamDataType.java:8: as
> of release 1.5, 'enum' is a keyword, and may not be used as an
> identifier
>    [javac] (try -source 1.4 or lower to use 'enum' as an identifier)
>    [javac] import org.apache.commons.lang.enum.Enum;
>    [javac]                                ^
>
> I would rather not try the -source 1.4 arg.  Is there any work around,
> or am I looking at some refactoring.

You have no choice if you want to use 1.5 sources, you must change the
code. If you can't or won't, you'll be stuck with 1.4 sources. This is
not an Ant question, BTW... --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message