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
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.
Probably would be good if eant died when java-ant-2 is not inherited and JAVA_PKG_STRICT=true.
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.
(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.