4N/A<?xml version="1.0" encoding="UTF-8"?>
4N/A<!--
292N/A
292N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
292N/A
292N/A Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
292N/A
292N/A The contents of this file are subject to the terms of either the GNU
292N/A General Public License Version 2 only ("GPL") or the Common Development
292N/A and Distribution License("CDDL") (collectively, the "License"). You
292N/A may not use this file except in compliance with the License. You can
292N/A obtain a copy of the License at
292N/A https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
292N/A or packager/legal/LICENSE.txt. See the License for the specific
292N/A language governing permissions and limitations under the License.
292N/A
292N/A When distributing the software, include this License Header Notice in each
292N/A file and include the License file at packager/legal/LICENSE.txt.
292N/A
292N/A GPL Classpath Exception:
292N/A Oracle designates this particular file as subject to the "Classpath"
292N/A exception as provided by Oracle in the GPL Version 2 section of the License
292N/A file that accompanied this code.
292N/A
292N/A Modifications:
292N/A If applicable, add the following below the License Header, with the fields
292N/A enclosed by brackets [] replaced by your own identifying information:
292N/A "Portions Copyright [year] [name of copyright owner]"
292N/A
292N/A Contributor(s):
292N/A If you wish your version of this file to be governed by only the CDDL or
292N/A only the GPL Version 2, indicate your decision by adding "[Contributor]
292N/A elects to include this software in this distribution under the [CDDL or GPL
292N/A Version 2] license." If you don't indicate a single choice of license, a
292N/A recipient has the option to distribute your version of this file under
292N/A either the CDDL, the GPL Version 2 or to extend the choice of license to
292N/A its licensees as provided above. However, if you add GPL Version 2 code
292N/A and therefore, elected the GPL Version 2 license, then the option applies
292N/A only if the new code is made subject to such option by the copyright
292N/A holder.
292N/A
4N/A-->
4N/A
4N/A<!--
4N/AContains common definition that are platform dependent
4N/A-->
4N/A<target name="tools.init">
4N/A <condition property="windows">
4N/A <os family="windows" />
4N/A </condition>
4N/A <condition property="unix">
4N/A <os family="unix" />
4N/A </condition>
4N/A <condition property="solaris">
4N/A <os name="SunOS"/>
4N/A </condition>
4N/A <condition property="linux">
4N/A <os name="Linux"/>
4N/A </condition>
4N/A <condition property="mac">
4N/A <os name="Mac OS X"/>
4N/A </condition>
4N/A</target>
4N/A<target name="tools.init.windows" if="windows">
4N/A <property name="JAVAH" value="${java.home}/bin/javah.exe"/>
4N/A <property name="MAKE" value="gmake"/>
4N/A</target>
4N/A<target name="tools.init.unix" if="unix" unless="mac">
4N/A <property name="JAVAH" value="${java.home}/bin/javah"/>
4N/A <property name="MAKE" value="gmake"/>
4N/A</target>
4N/A <target name="tools.init.mac" if="mac">
4N/A <property name="JAVAH" value="${java.home}/bin/javah"/>
4N/A <property name="MAKE" value="make"/>
4N/A</target>
4N/A<target name="tools.init.platform"
4N/A depends="tools.init, tools.init.windows, tools.init.unix, tools.init.mac">
4N/A</target>
4N/A
4N/A
4N/A<!--
4N/A Definitions for Checkstyle
4N/A-->
4N/A<target name="checkstyle"
4N/A description="Generates a report of coding convention violations.">
4N/A
4N/A <!-- Get properties from environment -->
4N/A <property environment="env"/>
4N/A
4N/A <!-- Set default values if these are not in the environment / cmd line -->
4N/A <!-- Order of preference is cmd line, environment, default -->
4N/A <property name="env.JWS_EXTERNAL_COMPONENTS_DIR" value="/net/koori.sfbay/onestop/s1aspe/8.0/external"/>
4N/A <property name="JWS_EXTERNAL_COMPONENTS_DIR" value="${env.JWS_EXTERNAL_COMPONENTS_DIR}"/>
4N/A <property name="env.CHECKSTYLE_HOME" value="${JWS_EXTERNAL_COMPONENTS_DIR}/checkstyle"/>
4N/A
4N/A <!-- CHECKSTYLE_HOME contains Checkstyle jars and config files -->
4N/A <property name="CHECKSTYLE_HOME" value="${env.CHECKSTYLE_HOME}"/>
4N/A
4N/A <taskdef resource="checkstyletask.properties" classpath="${CHECKSTYLE_HOME}/checkstyle-all-3.5.jar:${CHECKSTYLE_HOME}/checkstyle-sun-modules.jar"/>
4N/A
4N/A
4N/A <!-- CHECKSTYLE_DIR, CHECKSTYLE_FILES, CHECKSTYLE_STYLESHEET,
4N/A CHECKSTYLE_CONFIG and CHECKSTYLE_OUTPUT variables have defaults below.
4N/A They can be overridden by setting corresponding env variables
4N/A in the shell, or from the command line:
4N/A % ant -DCHECKSTYLE_DIR=somedir -DCHECKSTYLE_FILES="*.java" ....
4N/A (command-line overrides environment vars). -->
4N/A <condition property="CHECKSTYLE_FILES"
4N/A value="${env.CHECKSTYLE_FILES}">
4N/A <isset property="env.CHECKSTYLE_FILES"/>
4N/A </condition>
4N/A <property name="CHECKSTYLE_FILES" value="**/*.java"/>
4N/A
4N/A <condition property="CHECKSTYLE_DIR"
4N/A value="${env.CHECKSTYLE_DIR}">
4N/A <isset property="env.CHECKSTYLE_DIR"/>
4N/A </condition>
4N/A <property name="CHECKSTYLE_DIR" value="."/>
4N/A
4N/A <condition property="CHECKSTYLE_STYLESHEET"
4N/A value="${env.CHECKSTYLE_STYLESHEET}">
4N/A <isset property="env.CHECKSTYLE_STYLESHEET"/>
4N/A </condition>
4N/A <property name="CHECKSTYLE_STYLESHEET"
4N/A value="${CHECKSTYLE_HOME}/checkstyle-noframes-sorted.xsl"/>
4N/A
4N/A <condition property="CHECKSTYLE_OUTPUT"
4N/A value="${env.CHECKSTYLE_OUTPUT}">
4N/A <isset property="env.CHECKSTYLE_OUTPUT"/>
4N/A </condition>
4N/A <property name="CHECKSTYLE_OUTPUT" value="checkstyle-report.html"/>
4N/A
4N/A <condition property="CHECKSTYLE_CONFIG"
4N/A value="${env.CHECKSTYLE_CONFIG}">
4N/A <isset property="env.CHECKSTYLE_CONFIG"/>
4N/A </condition>
4N/A <property name="CHECKSTYLE_CONFIG" value="${CHECKSTYLE_HOME}/as-checks.xml"/>
4N/A
4N/A
4N/A <echo message="Running Checkstyle on ${CHECKSTYLE_DIR}/${CHECKSTYLE_FILES} using configuration ${CHECKSTYLE_CONFIG} and writing report to ${CHECKSTYLE_OUTPUT}"/>
4N/A
4N/A <checkstyle config="${CHECKSTYLE_CONFIG}"
4N/A failOnViolation="false">
4N/A <formatter type="xml" tofile="checkstyle-report.xml"/>
4N/A <fileset dir="${CHECKSTYLE_DIR}" includes="${CHECKSTYLE_FILES}"/>
4N/A </checkstyle>
4N/A
4N/A <style in="checkstyle-report.xml" out="${CHECKSTYLE_OUTPUT}" style="${CHECKSTYLE_STYLESHEET}"/>
4N/A
4N/A <delete file="checkstyle-report.xml"/>
4N/A
4N/A</target>
4N/A
4N/A
4N/A<target name="-push-to-maven-init" description="define a task for pushing bits to the maven repository">
4N/A <echo>${maven.repo.local}/com.sun.wts.tools.mri/jars/maven-repository-importer-${glassfish.maven_repository_importer.version}.jar</echo>
4N/A <taskdef resource="maven-repository-importer.properties">
4N/A <classpath>
4N/A <pathelement path="${maven.repo.local}/com.sun.wts.tools.mri/jars/maven-repository-importer-${glassfish.maven_repository_importer.version}.jar" />
4N/A </classpath>
4N/A </taskdef>
4N/A</target>
4N/A
4N/A<!--
4N/A import files to CVS
4N/A
4N/A For example, <cvs-import src="build/doc" dest="jaxb/www/doc" />
4N/A-->
4N/A<macrodef name="cvs-import">
4N/A <attribute name="src"/>
4N/A <attribute name="dest"/>
4N/A <sequential>
4N/A <tstamp />
4N/A <echo>importing to CVS...</echo>
4N/A <cvs dest="@{src}">
4N/A <commandline>
4N/A <argument value="-d${glassfish.cvsroot}"/>
4N/A <argument line="-z9 import -ko"/>
4N/A <argument value="-W"/>
4N/A <argument line="*.jar -kb"/>
4N/A <argument value="-m"/>
4N/A <argument value="deploying new jars to the java.net maven repository"/>
4N/A
4N/A <argument value="@{dest}"/>
4N/A <argument line="deployment-to-maven-repository t${DSTAMP}${TSTAMP}" />
4N/A </commandline>
4N/A </cvs>
4N/A </sequential>
4N/A</macrodef>