Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-java
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Gentoo Java <gentoo-java@g.o>
From: Petteri R├Ąty <betelgeuse@g.o>
Subject: JAVA_ANT_ENCODING
Date: Tue, 01 Jul 2008 22:02:40 +0300
Most of the time when Java files have !ascii characters they don't 
specify the used encoding in build.xml (usually ISO-8859-1) and 
javac/javadoc split out warnings about this (Many Gentoo machines are 
probably running with UTF8 locales). For this reason you can add 
JAVA_ANT_ENCODING="ISO-8859-1" to the ebuild and with the latest 
javatoolkit the build.xml will get modified to specify the proper encoding.

Regards,
Petteri
Index: java-ant-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v
retrieving revision 1.35
diff -u -r1.35 java-ant-2.eclass
--- java-ant-2.eclass	20 Jun 2008 10:32:15 -0000	1.35
+++ java-ant-2.eclass	1 Jul 2008 18:56:49 -0000
@@ -240,12 +245,22 @@
 
 		# for javadoc target and all in one pass, we need the new rewriter.
 		local rewriter3="/usr/share/javatoolkit/xml-rewrite-3.py"
-
 		if [[ ! -f ${rewriter3} ]]; then
 			rewriter3="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-3.py"
 		fi
 
-		if [[ ! -f ${rewriter3} ]]; then
+		local rewriter4="/usr/$(get_libdir)/javatoolkit/bin/build-xml-rewrite"
+
+		if [[ -x ${rewriter4} && ${JAVA_ANT_ENCODING} ]]; then
+			[[ ${JAVA_ANT_REWRITE_CLASSPATH} ]] && local gcp="-g"
+			[[ ${JAVA_ANT_ENCODING} ]] && local enc="-e ${JAVA_ANT_ENCODING}"
+			eval echo "cElementTree rewriter" ${output}
+			debug-print "${rewriter4} extra args: ${gcp} ${enc}"
+			${rewriter4} ${gcp} ${enc} \
+				-c "${JAVA_PKG_BSFIX_SOURCE_TAGS}" source ${want_source} \
+				-c "${JAVA_PKG_BSFIX_TARGET_TAGS}" target ${want_target} \
+				"${@}" || die "build-xml-rewrite failed"
+		elif [[ ! -f ${rewriter3} ]]; then
 			debug-print "Using second generation rewriter"
 			eval echo "Rewriting source attributes" ${output}
 			eval xml-rewrite-2.py ${files} \
@@ -392,9 +431,8 @@
 # ------------------------------------------------------------------------------
 java-ant_ignore-system-classes() {
 	debug-print-function ${FUNCNAME} $*
-	local file="${1}"
-	[[ -z "${1}" ]] && file=build.xml
-	echo "Changing ignoresystemclasses to true for available tasks"
+	local file=${1:-build.xml}
+	echo "Changing ignoresystemclasses to true for available tasks in ${file}"
 	java-ant_xml-rewrite -f "${file}" --change \
 		-e available -a ignoresystemclasses -v "true"
 }
Attachment:
signature.asc (OpenPGP digital signature)
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
maven dependency problem - plexus classworlds
Next by thread:
sun-jdk-1.7.0.0_alpha30 Version Bump
Previous by date:
Re: maven dependency problem - plexus classworlds
Next by date:
sun-jdk-1.7.0.0_alpha30 Version Bump


Updated Jun 17, 2009

Summary: Archive of the gentoo-java mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.