6668802: javac handles diagnostics for last line badly, if line not terminated by newline
Summary: use CharBuffer.limit(), not the length of the backing array
Reviewed-by: mcimadamore
<?xml version="1.0"?>
<!--
Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Sun designates this
particular file as subject to the "Classpath" exception as provided
by Sun in the LICENSE file that accompanied this code.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
CA 95054 USA or visit www.sun.com if you need additional information or
have any questions.
-->
<!--
This is the main build file for the complete jaxp workspace.
-->
<project name="jaxp" default="all" basedir=".">
<!-- Convenient shorthands for standard locations within the workspace. -->
<property file="build.properties"/>
<property name="topdir" value=".."/>
<property name="build.dir" location="${topdir}/build"/>
<property name="build.classes.dir" location="${build.dir}/classes"/>
<property name="build.gensrc.dir" location="${build.dir}/gensrc"/>
<property name="build.toolclasses.dir" location="${build.dir}/toolclasses"/>
<property name="dist.dir" location="${topdir}/dist"/>
<property name="dist.lib.dir" location="${dist.dir}/lib"/>
<property name="make.dir" location="${topdir}/make"/>
<property name="make.tools.dir" location="${make.dir}/tools"/>
<property name="src.dir" location="${topdir}/src"/>
<property name="src.classes.dir" location="${src.dir}/share/classes"/>
<property environment="env"/>
<target name="build" depends="banner, build-classes, build-tools">
<mkdir dir="${dist.lib.dir}"/>
<jar file="${dist.lib.dir}/classes.jar" basedir="${build.classes.dir}"/>
<zip file="${dist.lib.dir}/src.zip" basedir="${src.classes.dir}"/>
</target>
<!-- Debug information -->
<target name="sanity"
description="display settings of configuration values">
<echo level="info">ant.home = ${ant.home}</echo>
<echo level="info">java.home = ${env.JAVA_HOME}</echo>
<echo level="info">bootstrap.dir = ${bootstrap.dir}</echo>
</target>
<target name="build-tools" depends="-defs-pstrip">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<pstrip srcdir="${src.classes.dir}"
destdir="${build.classes.dir}"
includes="**/*.properties"/>
</target>
<target name="-defs-pstrip">
<mkdir dir="${build.toolclasses.dir}"/>
<javac srcdir="${make.tools.dir}/StripProperties"
destdir="${build.toolclasses.dir}/"
classpath="${ant.home}/lib/ant.jar"/>
<taskdef name="pstrip"
classname="StripPropertiesTask"
classpath="${build.toolclasses.dir}/"/>
</target>
<target name="build-classes" depends="sanity">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<javac fork="true"
srcdir="${src.classes.dir}"
destdir="${build.classes.dir}"
memoryInitialSize="${javac.memoryInitialSize}"
memoryMaximumSize="${javac.memoryMaximumSize}"
target="${javac.target}">
<compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
<compilerarg line="${javac.version.opt}"/>
</javac>
</target>
<target name="clean" description="Delete all generated files">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="banner">
<echo>+---------------------------------------+</echo>
<echo>+ Building JAXP Component +</echo>
<echo>+---------------------------------------+</echo>
</target>
</project>