view plugins/simple_methods_anc/build.xml @ 38:2e8d8c4675db

7902161 : Discover simple getters, setters, throwers and delegators Reviewed-by: afedorch
author shurailine
date Wed, 16 May 2018 11:41:39 -0700
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?>

  Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.

  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.  Oracle designates this
  particular file as subject to the "Classpath" exception as provided
  by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  or visit if you need additional information or have any
<project name="SimpleMethodsANCFilter" default="jar" basedir=".">
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="test" location="test"/>
  <property name="build" location="build"/>
  <property name="classes" location="${build}/classes"/>
  <property name="test.classes" location="${build}/tests"/>
  <property name="test.jar" location="${build}/tests.jar"/>
  <property name="jar" location="${build}/SimpleMethods.jar"/>
  <property name="test.results" location="${build}/test_results"/>
  <property name="jcov.jar" location="../../JCOV_BUILD/jcov_3.0/jcov.jar"/>

  <target name="compile">
    <available file="${jcov.jar}" property="jcov-jar-exists"/>
    <fail unless="jcov-jar-exists" message="There is no ${jcov.jar}"/>
    <mkdir dir="${classes}"/>
    <javac srcdir="${src}" classpath="${jcov.jar}" destdir="${classes}"/>

  <target name="jar" depends="compile">
    <jar jarfile="${jar}" basedir="${classes}"/>

  <target name="clean">
    <delete dir="${build}"/>

  <target name="compile-test">
    <fail unless="testng.classpath" message="Please specify testng.classpath"/>
    <mkdir dir="${test.classes}"/>
    <javac srcdir="${test}" classpath="${classes}:${jcov.jar}:${testng.classpath}" destdir="${test.classes}"/>

  <target name="test" depends="compile,compile-test">
    <taskdef resource="testngtasks" classpath="${testng.classpath}"/>
    <mkdir dir="${test.results}"/>
    <jar jarfile="${test.jar}" basedir="${test.classes}"/>
    <propertyset id="test.bytecode">
      <propertyref name="test.classes"/>
      <propertyref name="test.jar"/>
    <testng classpath="${classes}:${jcov.jar}:${test.classes}:${testng.classpath}" outputDir="${test.results}">
      <classfileset dir="${test.classes}" includes="**/*.class"/>
      <propertyset refid="test.bytecode"/>