All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gate.resources.creole.bootstrap.Template.build.xml Maven / Gradle / Ivy

Go to download

GATE - general achitecture for text engineering - is open source software capable of solving almost any text processing problem. This artifact enables you to embed the core GATE Embedded with its essential dependencies. You will able to use the GATE Embedded API and load and store GATE XML documents. This artifact is the perfect dependency for CREOLE plugins or for applications that need to customize the GATE dependencies due to confict with their own dependencies or for lower footprint.

The newest version!
<!--======================================================================

   Build file for ___RESOURCE___

   This file will allow you to build your plugin with Ant.  If you do not
   have an Ant installation of your own, you can use the one supplied with
   GATE by running

     {gate.home}/bin/ant

   or, on Windows
     
     {gate.home}\bin\ant

   where {gate.home} is the directory in which GATE was installed.

=======================================================================-->
<project name="Template" basedir="." default="all">

  <property file="build.properties" />

  <!--=======================================================
    Property settings.  You should not need to edit these
    directly, if you need to set a different value for any
    property you should edit build.properties and override
    them there.
  ========================================================-->

  <!-- Name of the plugin -->
  <property name="plugin.name" value="___RESOURCE___"/>

  <!-- Make environment variables available -->
  <property environment="env" />

  <!-- If environment variable GATE_HOME is set, use it for
       gate.home (unless it was already set in build.properties -->
  <condition property="gate.home" value="${env.GATE_HOME}">
    <isset property="env.GATE_HOME"/>
  </condition>

  <!-- If gate.home is not set from build.properties or the 
       environment variable GATE_HOME, assume that this
       plugin is in GATE Developer's plugin directory -->
  <property name="gate.home" location="../.." />

  <!-- location of GATE lib directory - should be inferred from gate.home -->
  <property name="gate.lib" location="${gate.home}/lib" />

  <!-- location of gate.jar - should be inferred from gate.home -->
  <property name="gate.jar" location="${gate.home}/bin/gate.jar" />

  <!-- Source directory - contains the Java source files for this plugin -->
  <property name="src.dir" location="src" />

  <!-- directory to contain the compiled classes -->
  <property name="classes.dir" location="classes" />

  <!-- documentation directory -->
  <property name="doc.dir" location="doc" />

  <!-- JavaDoc documentation directory -->
  <property name="javadoc.dir" location="${doc.dir}/javadoc" />

  <!-- lib directory - put any additional JAR files your plugin requires into
       this directory.  You will also need to add them as <JAR> entries in
       creole.xml -->
  <property name="lib.dir" location="lib" />

  <!-- location for the generated JAR file -->
  <property name="jar.location" location="${plugin.name}.jar" />



  <!-- Classpath to compile - includes gate.jar, GATE/lib/*.jar and any local
       library JAR files. -->
  <path id="compile.classpath">
    <pathelement location="${gate.jar}" />
    <fileset dir="${gate.lib}">
      <include name="**/*.jar" />
      <include name="**/*.zip" />
    </fileset>
    <fileset dir="${lib.dir}" includes="**/*.jar" />
  </path>
  
  <!--====================== Targets ============================-->
  
  <!-- create build directory structure -->
  <target name="prepare">
    <mkdir dir="${classes.dir}" />
  </target>

  <!-- compile the source -->
  <target name="compile" depends="prepare">
    <javac classpathref="compile.classpath"
           srcdir="${src.dir}"
           destdir="${classes.dir}"
           debug="true"
           debuglevel="lines,source"
    	   encoding="UTF-8"
           source="1.6"
           target="1.6">
    	<compilerarg value="-Xmaxwarns" />
    	<compilerarg value="${gate.compile.maxwarnings}" />
    	<compilerarg value="-Xlint:all" />
    </javac>
  </target>

  <!-- copy resources (anything non-.java) from src to classes -->
  <target name="copy.resources" depends="prepare">
    <copy todir="${classes.dir}">
      <fileset dir="${src.dir}" excludes="**/*.java" />
    </copy>
  </target>

  <!-- create the JAR file -->
  <target name="jar" depends="compile, copy.resources" >
    <jar destfile="${jar.location}"
         update="false"
         basedir="${classes.dir}" />
  </target>

  <!-- remove the generated .class files -->
  <target name="clean.classes" >
    <delete dir="${classes.dir}" />
  </target>

  <!-- clean resources generated by tests -->
  <target name="clean.tests">
    <delete>
      <fileset dir="." includes="TEST*.xml" />
    </delete>
  </target>

  <!-- Clean up - remove .class and .jar files -->
  <target name="clean" depends="clean.classes, clean.tests" >
    <delete file="${jar.location}" />
  </target>

  <!-- Clean up everything, including Javadoc -->
  <target name="docclean" depends="clean, clean.javadoc" >
  </target>

  <!-- Build JavaDoc documentation -->
  <target name="doc.prepare">
    <mkdir dir="${javadoc.dir}" />
  </target>

  <!-- Clean JavaDoc documentation -->
  <target name="clean.javadoc">
    <delete dir="${javadoc.dir}" />
  </target>

  <target name="javadoc" depends="doc.prepare">
    <javadoc destdir="${javadoc.dir}" packagenames="*"
             classpathref="compile.classpath"
             encoding="UTF-8"
             windowtitle="${plugin.name} JavaDoc"
             source="1.5">
      <sourcepath>
        <pathelement location="${src.dir}" />
      </sourcepath>
      <link href="http://java.sun.com/j2se/1.5.0/docs/api/" />
      <link href="../../../../doc/javadoc/" />
    </javadoc>
  </target>

  <!-- Build everything - the code and JavaDoc -->
  <target name="all" depends="jar, javadoc" />

  <!-- Other targets used by the main GATE build file:
         build: build the plugin - just calls "jar" target
         test : run the unit tests - there aren't any
         distro.prepare: remove intermediate files that shouldn't be in the
                         distribution
  -->
  <target name="build" depends="jar" />
  <target name="test" />
  <target name="distro.prepare" depends="clean.classes, clean.tests" />

</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy