Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143203 - Error build commons-attributes 2.1-r1
Summary: Error build commons-attributes 2.1-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-08 05:49 UTC by Massimo Fantin
Modified: 2006-08-08 12:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Massimo Fantin 2006-08-08 05:49:20 UTC
I cannot build the commons-attributes 2.1-r1 with new java system 1.5 because the source use the "enum" word that for java 1.5 is a reserved word

Maybe we need to upgrade to version 2.2 for java 1.5 

Thanks
Massimo Fantin

----------------------------------------------------------------------
emerge error :


    [javac] /var/tmp/portage/commons-attributes-2.1-r1/work/commons-attributes-2.1/compiler/src/java/org/apache/commons/attributes/compiler/AttributeIndexer.java:155: 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]                     JarEntry entry = (JarEntry) enum.nextElement ();
    [javac]                                                 ^
    [javac] /var/tmp/portage/commons-attributes-2.1-r1/work/commons-attributes-2.1/compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java:146: 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]                 Enumeration enum = jar.entries ();
    [javac]                             ^
    [javac] /var/tmp/portage/commons-attributes-2.1-r1/work/commons-attributes-2.1/compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java:147: 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]                 while (enum.hasMoreElements ()) {
    [javac]                        ^
    [javac] /var/tmp/portage/commons-attributes-2.1-r1/work/commons-attributes-2.1/compiler/src/java/org/apache/commons/attributes/validation/AttributeValidatorTask.java:148: 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]                     JarEntry entry = (JarEntry) enum.nextElement ();
    [javac]                                                 ^
    [javac] 9 errors

BUILD FAILED
/var/tmp/portage/commons-attributes-2.1-r1/work/commons-attributes-2.1/build.xml:56: Compile failed; see the compiler error output for details.

Total time: 1 second

!!! ERROR: dev-java/commons-attributes-2.1-r1 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  commons-attributes-2.1-r1.ebuild, line 42:   Called eant 'jar' '-Dnoget=true'
  java-utils-2.eclass, line 1267:   Called die

!!! eant failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.07"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"
and of course, the output of emerge --info
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-08 09:40:29 UTC
Ebuild is missing java-ant-2 in inherit, hence no build.xml rewriting for -source 1.4 -target 1.4. After adding it, it works.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-08 12:39:37 UTC
Probably would be good if eant died when java-ant-2 is not inherited and JAVA_PKG_STRICT=true.
Comment 3 Josh Nichols (RETIRED) gentoo-dev 2006-08-08 12:45:19 UTC
Not necessarily. There are cases when you wouldn't want to / need to inherit java-ant-2. This includes times when the rewritting breaks the build.xml (it does happen occaisionally) and when the build.xml already specifies source/target for everything.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2006-08-08 12:49:15 UTC
(In reply to comment #1)
> Ebuild is missing java-ant-2 in inherit, hence no build.xml rewriting for
> -source 1.4 -target 1.4. After adding it, it works.
> 

Fixed.