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