889 lines
36 KiB
XML
889 lines
36 KiB
XML
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Filename: $RCSfile$
|
|
Purpose: Ant build file for JavaEvA.
|
|
|
|
Ant-Download: http://jakarta.apache.org/ant
|
|
Ant-Manual: http://jakarta.apache.org/ant/manual/index.html
|
|
|
|
Precondition: 1. Ant should be installed.
|
|
2. JAVA_HOME environment variable contains the path to JDK1.5 or higher
|
|
3. ANT_HOME environment variable contains the path to ant's home directory
|
|
|
|
Language: XML
|
|
Compiler: Ant
|
|
Authors: Holger Ulmer, Felix Streichert, Joerg Wegner
|
|
Version: $Revision: 284 $
|
|
$Date: 2007-11-27 14:37:05 +0100 (Tue, 27 Nov 2007) $
|
|
$Author: mkron $
|
|
Copyright (c) Dept. Computer Architecture, University of Tuebingen, Germany
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<project name="JavaEvA" default="compile" basedir="..">
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Set properties
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<!-- SET THE DIRECTORY PROPERTIES -->
|
|
<property name="source.directory" value="src" />
|
|
<property name="build.directory" value="build" />
|
|
<property name="distribution.directory" value="dist" />
|
|
<property name="resources.directory" value="resources" />
|
|
<property name="source.distribution.directory" value="${distribution.directory}/src-dist" />
|
|
<property name="binary.distribution.directory" value="${distribution.directory}/bin-dist" />
|
|
<property name="javadoc.directory" value="doc/api" />
|
|
<property name="library.directory" value="lib" />
|
|
|
|
<!-- SET THE BINARY LIBRARIES PROPERTIES -->
|
|
<property name="check.libraries.ant" value="ant/check.xml" />
|
|
<property name="windows.libraries" value="${library.directory}/windows" />
|
|
<property name="unix.libraries" value="${library.directory}/linux" />
|
|
<property name="library.SNNS" value="SNNS_jkr" />
|
|
<property name="library.JMatLink" value="JMatLink" />
|
|
<property name="library.WSI.ant" value="../java" />
|
|
<property name="library.WSI.original" value="${library.WSI.ant}/dist/wsi.jar" />
|
|
<property name="library.WSI" value="lib/wsi2.jar" />
|
|
|
|
<!-- SET THE JAVA BINARY LIBRARIES PROPERTIES -->
|
|
<property name="ant.java.version" value="1.5" />
|
|
|
|
<!-- SET CLASSPATH -->
|
|
<path id="project.class.path">
|
|
<pathelement location="${env.JAVA_HOME}/jre/lib/rt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/dt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar" />
|
|
<pathelement location="./lib/jdom.jar" />
|
|
<pathelement location="./lib/xerces.jar" />
|
|
<pathelement location="./lib/crimson.jar" />
|
|
<pathelement location="./lib/xalan2.jar" />
|
|
<pathelement location="${build.directory}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</path>
|
|
|
|
<!-- SET THE CVS RELEVANT PROPERTIES -->
|
|
<property name="cvs.ant" value="ant/cvs.xml" />
|
|
<property name="repository.directory.unix" value="/afs/wsi/ra/Repository" />
|
|
<property name="cvs.destination.unix" value="${source.directory}" />
|
|
<property name="repository.directory.windows" value="X:/wsi/ra/Repository" />
|
|
<property name="cvs.destination.windows" value="${source.directory}" />
|
|
|
|
<!-- ENVIRNONMENT PROPERTIES -->
|
|
<property environment="env"/>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Usage
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="usage" unless="silent">
|
|
<echo>
|
|
Supported targets (default=compileAll):
|
|
-------------------------------------------------------------------------
|
|
check - checks if all needed binary and source libraries are
|
|
available.
|
|
compile - compile all project files.
|
|
compileAll - 1. gets an actual version from the WSI library
|
|
2. and compiles all project files.
|
|
javadoc - build project javadoc files
|
|
binaryDist - will create a complete binary distribution
|
|
clean - will clean up files, except the source files and the api
|
|
documentation
|
|
run - will start JavaEvA
|
|
|
|
use 'ant -projecthelp' for further Main targets
|
|
</echo>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Library check
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="check">
|
|
<ant inheritAll="true" antfile="${check.libraries.ant}" target="binary.libraries.test">
|
|
<property name="silent" value="true"/>
|
|
</ant>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Init
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="buildDirectories" unless="noDirectories">
|
|
<mkdir dir="${build.directory}" />
|
|
<mkdir dir="${distribution.directory}" />
|
|
<mkdir dir="${source.distribution.directory}" />
|
|
<mkdir dir="${binary.distribution.directory}" />
|
|
<mkdir dir="${javadoc.directory}" />
|
|
</target>
|
|
|
|
<target name="init">
|
|
<tstamp />
|
|
<antcall target="buildDirectories"></antcall>
|
|
<condition property="isWindows">
|
|
<and>
|
|
<os family="windows" />
|
|
<not>
|
|
<os family="unix" />
|
|
</not>
|
|
</and>
|
|
</condition>
|
|
<condition property="isUnix">
|
|
<and>
|
|
<os family="unix" />
|
|
<not>
|
|
<os family="windows" />
|
|
</not>
|
|
</and>
|
|
</condition>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Clean
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="clean" description="Cleans up project directories.">
|
|
<delete dir="${build.directory}" />
|
|
<delete dir="${distribution.directory}" />
|
|
</target>
|
|
|
|
<target name="cleanAll" depends="init, clean">
|
|
<ant inheritAll="false" antfile="build.xml" dir="${library.WSI.ant}" target="clean">
|
|
<property name="silent" value="true"/>
|
|
</ant>
|
|
</target>
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Update libraries
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
<target name="update.library.WSI" depends="init">
|
|
<!--<ant inheritAll="false" antfile="build.xml" dir="${library.WSI.ant}" target="compile">
|
|
<property name="silent" value="true"/>
|
|
</ant>
|
|
-->
|
|
<ant inheritAll="false" antfile="build.xml"
|
|
dir="${library.WSI.ant}" target="dist4JOpt">
|
|
<property name="silent" value="true"/>
|
|
</ant>
|
|
<delete>
|
|
<fileset dir="${library.directory}" includes="wsi*jar" />
|
|
</delete>
|
|
<copy file="${library.WSI.original}" tofile="${library.WSI}"/>
|
|
</target>
|
|
|
|
<target name="update.libraries" depends="update.library.WSI">
|
|
</target>
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Compile
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="compileAll" depends="usage, update.libraries" description="Update libraries and compile the project.">
|
|
<antcall target="compile">
|
|
</antcall>
|
|
</target>
|
|
|
|
<target name="compileInfo" unless="silent">
|
|
<echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>
|
|
<echo message="JAVA_HOME is set to = ${env.JAVA_HOME}"/>
|
|
<echo message="You are using JDK version ${ant.java.version}"/>
|
|
<echo message="currently JDK version 1.3 is recomended!"/>
|
|
<echo message=""/>
|
|
<echo message="use 'ant compileAll' - to compile all java sources (+ WSI)."/>
|
|
<echo message="use 'ant compile' - to compile only the java sources (faster)."/>
|
|
</target>
|
|
|
|
<target name="compile" depends="usage, init, check, compileInfo" description="Compiles the project." >
|
|
<!-- COMPILE PROJECT -->
|
|
<javac destdir="${build.directory}" optimize="on" deprecation="on" nowarn="on">
|
|
<src path="${source.directory}" />
|
|
<exclude name="ant/**" />
|
|
<exclude name="build/**" />
|
|
<exclude name="dist/**" />
|
|
<exclude name="doc/**" />
|
|
<exclude name="resources/**" />
|
|
<exclude name="images/**" />
|
|
<exclude name="lib/**" />
|
|
<exclude name="project/**" />
|
|
<classpath>
|
|
<pathelement path="${project.class.path}" />
|
|
<!-- <pathelement path="${library.WSI}" />
|
|
<pathelement path="${library.JavaNNS}" /> -->
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</classpath>
|
|
</javac>
|
|
|
|
<!-- GENERATE RMI STUB FILES -->
|
|
<rmic includes="wsi/ra/jproxy/RMIInvocationHandlerImpl.class" stubversion="-v1.2" base="${build.directory}"/>
|
|
<rmic includes="wsi/ra/jproxy/RMIThreadInvocationHandlerImpl.class" stubversion="-v1.2" base="${build.directory}"/>
|
|
|
|
<!-- COPY DATA FILES TO BUILD DIRECTORY -->
|
|
<copy todir="${build.directory}/resources">
|
|
<fileset dir="${resources.directory}" includes="**/*" />
|
|
</copy>
|
|
<!--
|
|
<copy todir="${build.directory}/resources/images">
|
|
<fileset dir="${resources.directory}/images" includes="*gif" />
|
|
</copy>
|
|
|
|
<copy todir="${build.directory}/resources/images">
|
|
<fileset dir="${resources.directory}/images" includes="*jpg" />
|
|
</copy>
|
|
|
|
<copy todir="${build.directory}/resources/images">
|
|
<fileset dir="${resources.directory}/images" includes="*png" />
|
|
</copy>
|
|
<copy todir="${build.directory}/resources/">
|
|
<fileset dir="${resources.directory}" includes="*html" />
|
|
</copy>
|
|
<copy todir="${build.directory}/resources/ORLibrary">
|
|
<fileset dir="${resources.directory}/ORLibrary" includes="*txt" />
|
|
</copy>
|
|
<copy todir="${build.directory}/resources/Altana">
|
|
<fileset dir="${resources.directory}/Altana" includes="*dat" />
|
|
</copy>
|
|
<copy todir="${build.directory}/resources/TSP">
|
|
<fileset dir="${resources.directory}/TSP" includes="*" />
|
|
</copy>
|
|
<copy todir="${build.directory}/resources/TSP/euc2d">
|
|
<fileset dir="${resources.directory}/TSP/euc2d" includes="*tsp" />
|
|
</copy>
|
|
<copy todir="${build.directory}/resources/TSP/instances">
|
|
<fileset dir="${resources.directory}/TSP/instances" includes="*tsp" />
|
|
</copy>
|
|
-->
|
|
</target>
|
|
|
|
<!-- =================================================================== -->
|
|
<!-- Jars all classes into one jar file -->
|
|
<!-- =================================================================== -->
|
|
<target name="bundle" depends="compile" description="Compiles the project and puts the whole stuff into a jar-file..">
|
|
<property name="bin.dist.dir" value="${binary.distribution.directory}/javaeva-${DSTAMP}" />
|
|
<mkdir dir="${bin.dist.dir}" />
|
|
<mkdir dir="${bin.dist.dir}/${library.directory}" />
|
|
<delete> <fileset dir="${bin.dist.dir}/${library.directory}" includes="*JavaEvA*jar" /> </delete>
|
|
<jar jarfile="${bin.dist.dir}/${library.directory}/JavaEvA.jar" basedir="${build.directory}">
|
|
|
|
<!-- JKW: That's bad practice, if we have internal dependencies -->
|
|
<!-- JKW: Use a correct shell script or ant task to run application, which -->
|
|
<!-- JKW: resolves the classpath automatically from all libraries in the library directory -->
|
|
<zipgroupfileset dir="${library.directory}">
|
|
<include name="jdom.jar"/>
|
|
<include name="activation.jar"/>
|
|
<include name="imap.jar"/>
|
|
<include name="joelib.jar"/>
|
|
<include name="log4j.jar"/>
|
|
<include name="mail.jar"/>
|
|
<include name="mailapi.jar"/>
|
|
<include name="pop3.jar"/>
|
|
<include name="smtp.jar"/>
|
|
<include name="xalan2.jar"/>
|
|
<include name="wsi.jar"/>
|
|
</zipgroupfileset>
|
|
<!--<fileset dir="${classes.dir}" excludes="*test*"/>-->
|
|
<manifest> <attribute name="Main-Class" value="javaeva.client.EvAClient"/> </manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<!-- ===================================================================
|
|
-->
|
|
<!-- Jars all classes into one jar file
|
|
-->
|
|
<!-- ===================================================================
|
|
-->
|
|
<target name="bundlehannes" depends="compile" description="Compiles the project and puts the whole stuff into a jar-file..">
|
|
<property name="bin.dist.dir" value="${binary.distribution.directory}/javaeva-${DSTAMP}" />
|
|
<mkdir dir="${bin.dist.dir}" />
|
|
<mkdir dir="${bin.dist.dir}/${library.directory}" />
|
|
<delete>
|
|
<fileset dir="${bin.dist.dir}/${library.directory}" includes="*JavaEvA*jar" />
|
|
</delete>
|
|
<jar jarfile="${bin.dist.dir}/${library.directory}/JavaEvA.jar" basedir="${build.directory}" filesetmanifest="mergewithoutmain">
|
|
<!-- JKW: That's bad practice, if we have internal dependencies -->
|
|
<!-- JKW: Use a correct shell script or ant task to run application, which -->
|
|
<!-- JKW: resolves the classpath automatically from all libraries in the library directory -->
|
|
<zipgroupfileset dir="${library.directory}">
|
|
<include name="**/*.jar" />
|
|
</zipgroupfileset>
|
|
<!-- <fileset dir="${classes.dir}" excludes="*test*"/>
|
|
-->
|
|
<manifest>
|
|
<attribute name="Main-Class" value="javaeva.client.EvAClient" />
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Binary Distribution
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
<target name="binaryDist" depends="compile" description="Compiles the project and puts the whole stuff into a jar-file..">
|
|
<property name="bin.dist.dir" value="${binary.distribution.directory}/javaeva-${DSTAMP}" />
|
|
<mkdir dir="${bin.dist.dir}" />
|
|
<mkdir dir="${bin.dist.dir}/${library.directory}" />
|
|
<delete>
|
|
<fileset dir="${bin.dist.dir}/${library.directory}" includes="*JavaEvA*jar" />
|
|
</delete>
|
|
|
|
<!-- <jar jarfile="${bin.dist.dir}/${library.directory}/JavaEvA.jar" manifest="project/javaeva.man" basedir="${build.directory}" /> -->
|
|
<jar jarfile="${bin.dist.dir}/${library.directory}/JavaEvA.jar" basedir="${build.directory}" >
|
|
<manifest> <attribute name="Main-Class" value="javaeva.client.EvAClient"/> </manifest>
|
|
</jar>
|
|
<copy todir="${bin.dist.dir}/${library.directory}">
|
|
<fileset dir="${library.directory}">
|
|
<include name="**/**" />
|
|
<exclude name="CVS" />
|
|
</fileset>
|
|
</copy>
|
|
|
|
<!--
|
|
<copy todir="${bin.dist.dir}/ant">
|
|
<fileset dir="ant">
|
|
<include name="**/**" />
|
|
<exclude name="CVS" />
|
|
</fileset>
|
|
</copy>
|
|
|
|
<copy todir="${bin.dist.dir}">
|
|
<fileset dir=".">
|
|
<include name="run.sh"/>
|
|
<include name="run.bat"/>
|
|
<include name="run_javaeva.sh"/>
|
|
<include name="run_javaeva.bat"/>
|
|
<include name="*.txt"/>
|
|
<include name="*.html"/>
|
|
</fileset>
|
|
</copy>
|
|
|
|
<copy todir="${bin.dist.dir}/html/manual">
|
|
<fileset dir="html/manual">
|
|
<include name="**/**.gif" />
|
|
<include name="**/**.jpg" />
|
|
<include name="**/**.ps" />
|
|
<include name="**/**.pdf" />
|
|
<include name="**/**.htm" />
|
|
<include name="**/**.html" />
|
|
<exclude name="CVS, *.tar*, *.zip" />
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${bin.dist.dir}/${javadoc.directory}">
|
|
<fileset dir="${javadoc.directory}">
|
|
<include name="**/**" />
|
|
</fileset>
|
|
</copy>
|
|
|
|
<copy todir="${bin.dist.dir}/${tutorial.directory}">
|
|
<fileset dir="tutorial">
|
|
<include name="**/**" />
|
|
<exclude name="CVS" />
|
|
</fileset>
|
|
</copy>
|
|
-->
|
|
|
|
<tar tarfile="${distribution.directory}/javaeva-bin-${DSTAMP}.tar">
|
|
<tarfileset dir="${binary.distribution.directory}">
|
|
<include name="**" />
|
|
<exclude name="*.tar*, *.zip" />
|
|
</tarfileset>
|
|
</tar>
|
|
<gzip zipfile="${distribution.directory}/javaeva-bin-${DSTAMP}.tar.gz"
|
|
src="${distribution.directory}/javaeva-bin-${DSTAMP}.tar" />
|
|
<delete file="${distribution.directory}/javaeva-bin-${DSTAMP}.tar" />
|
|
|
|
<zip zipfile="${distribution.directory}/javaeva-bin-${DSTAMP}.zip">
|
|
<zipfileset dir="${binary.distribution.directory}">
|
|
<include name="**" />
|
|
<exclude name="*.tar*, *.zip" />
|
|
</zipfileset>
|
|
</zip>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Source Distribution
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="sourceDist" depends="init">
|
|
<fail message="Not properly supported yet!"/>
|
|
|
|
<property name="src.dist.dir" value="${source.distribution.directory}/javaeva-${DSTAMP}" />
|
|
<mkdir dir="${src.dist.dir}" />
|
|
|
|
<copy todir="${src.dist.dir}">
|
|
<fileset dir=".">
|
|
<include name="build.xml" />
|
|
<include name="build.sh" />
|
|
<include name="build.bat" />
|
|
<include name="run.sh" />
|
|
<include name="run.bat" />
|
|
<include name="*.txt" />
|
|
</fileset>
|
|
</copy>
|
|
|
|
<copy todir="${src.dist.dir}/${source.directory}">
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*java" />
|
|
<include name="**/*txt" />
|
|
</fileset>
|
|
</copy>
|
|
|
|
<mkdir dir="${src.dist.dir}/${library.directory}" />
|
|
<copy todir="${src.dist.dir}/${library.directory}">
|
|
<fileset dir="${library.directory}" includes="**jar" />
|
|
</copy>
|
|
|
|
<copy todir="${src.dist.dir}/docs/tutorial">
|
|
<fileset dir="docs/tutorial">
|
|
<include name="**.tex" />
|
|
<include name="**.sh" />
|
|
<include name="**.eps" />
|
|
<include name="**.gif" />
|
|
<include name="**.jpg" />
|
|
<include name="**.bib" />
|
|
<include name="**.bst" />
|
|
<include name="**.zip" />
|
|
<include name="**.htm" />
|
|
<include name="**.html" />
|
|
</fileset>
|
|
</copy>
|
|
|
|
<tar tarfile="${distribution.directory}/javaeva-src-${DSTAMP}.tar"
|
|
basedir="${source.distribution.directory}" includes="**" excludes="*.tar*, *.zip"/>
|
|
<gzip zipfile="${distribution.directory}/javaeva-src-${DSTAMP}.tar.gz"
|
|
src="${distribution.directory}/javaeva-src-${DSTAMP}.tar" />
|
|
<delete file="${distribution.directory}/javaeva-src-${DSTAMP}.tar" />
|
|
|
|
<zip zipfile="${distribution.directory}/javaeva-src-${DSTAMP}.zip">
|
|
<zipfileset dir="${source.distribution.directory}">
|
|
<include name="**" />
|
|
<exclude name="*.tar*, *.zip" />
|
|
</zipfileset>
|
|
</zip>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Generate Distribution
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="dist" depends="binaryDist, sourceDist">
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Run JavaEvA
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="run" description="Runs JavaEvA.">
|
|
<java classname="javaeva.client.EvAClient" fork="yes">
|
|
<jvmarg value="-Xmx512m"/>
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Run JavaEvA
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="Altana" description="Runs Altana CombiLib Problem.">
|
|
<java classname="javaeva.server.oa.go.GOAltana" fork="yes">
|
|
<jvmarg value="-Xmx512m"/>
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="Portfolio" description="Runs GOPortfolio.">
|
|
<java classname="javaeva.server.oa.go.GOPortfolio" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="PortfolioLS" description="Runs GOPortfolioLS.">
|
|
<java classname="javaeva.server.oa.go.GOPortfolioLS" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="PMOEA" description="Runs ParallelMOEAs.">
|
|
<java classname="javaeva.server.oa.go.GOParallelMOEA" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="GridMC" description="Runs a Grid Search for GO.">
|
|
<java classname="javaeva.server.oa.go.GOGridSearchTwo" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
|
|
<target name="GOSSFirst" description="Runs a comparison on system identification.">
|
|
<java classname="javaeva.server.oa.go.GOSystemComparing" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="GOSSMSHC" description="Runs a comparison on system identification.">
|
|
<java classname="javaeva.server.oa.go.GOSystemMSHC" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="GOSSESPopSize" description="Runs a comparison on system identification.">
|
|
<java classname="javaeva.server.oa.go.GOSystemESPopSize" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="GOSSPmPc" description="Runs a comparison on system identification.">
|
|
<java classname="javaeva.server.oa.go.GOSystemPmPc" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="GOSSESMutation" description="Runs a comparison on system identification.">
|
|
<java classname="javaeva.server.oa.go.GOSystemESMutation" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="GOSSGACrossover" description="Runs a comparison on system identification.">
|
|
<java classname="javaeva.server.oa.go.GOSystemGACrossover" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<target name="GOSSMALSLI" description="Runs a comparison on system identification.">
|
|
<java classname="javaeva.server.oa.go.GOSystemMA" fork="yes">
|
|
<jvmarg value="-Xmx512m" />
|
|
<classpath refid="project.class.path" />
|
|
</java>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
Javadoc
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="javadoc" description="Generates the JavaDoc-API Documentation.">
|
|
<javadoc packagenames="javaeva.*"
|
|
windowtitle ="JavaEvA API Documentation"
|
|
doctitle ="JavaEvA API Documentation"
|
|
author ="true"
|
|
version ="true"
|
|
use ="true"
|
|
destdir="${javadoc.directory}"
|
|
private ="true">
|
|
<classpath refid="project.class.path" />
|
|
<sourcepath>
|
|
<pathelement path="${source.directory}" />
|
|
</sourcepath>
|
|
<doctitle><![CDATA[<h1>Test</h1>]]></doctitle>
|
|
|
|
<header><![CDATA[<font size="-1"><b><i>
|
|
<A HREF="http://www-ra.informatik.uni-tuebingen.de/forschung/"
|
|
target="_top">JavaEvA
|
|
</A>
|
|
</b></i></font>]]>
|
|
</header>
|
|
|
|
<footer><![CDATA[javaeva<br>
|
|
<A HREF="http://www-ra.informatik.uni-tuebingen.de/forschung/"
|
|
target="_top">JavaEvA
|
|
</A><BR>
|
|
E-Mail:
|
|
<A HREF="mailto:ulmer@informatik.uni-tuebingen.de">
|
|
ulmer@informatik.uni-tuebingen.de
|
|
</A>]]>
|
|
|
|
</footer>
|
|
|
|
<link offline="true"
|
|
href="http://java.sun.com/j2se/jdk1.5.0_03/docs/api/"
|
|
packagelistLoc="${env.JAVA_HOME}/docs/api"
|
|
/>
|
|
<link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
What's about the software design ?!;-)
|
|
Download required libraries from the JOELib download site:
|
|
http://sourceforge.net/projects/joelib
|
|
Package name: optional-softwaredesign-libs
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|
|
|
|
<target name="pmd" depends="init" description="SOFTWAREDESIGN: Project Mess Detector !;-)">
|
|
<echo>Checking Project Mess Detection (PMD) rulesets.</echo>
|
|
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
|
|
<classpath>
|
|
<pathelement path="${project.class.path}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</classpath>
|
|
</taskdef>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/basic.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_basic.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_basic.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/braces.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_braces.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_braces.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/codesize.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_codesize.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_codesize.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/controversial.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_controversial.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_controversial.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/coupling.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_coupling.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_coupling.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/finalizers.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_finalizers.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_finalizers.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/imports.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_imports.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_imports.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/naming.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_naming.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_naming.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/strictexception.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_strictexception.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_strictexception.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/strings.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_strings.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_strings.html</echo>
|
|
|
|
<pmd shortFilenames="true" rulesetfiles="rulesets/unusedcode.xml" failonerror="no">
|
|
<formatter type="summaryhtml" toFile="${build.directory}/pmdReport4JavaEVA-${DSTAMP}_unusedcode.html"/>
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</pmd>
|
|
<echo>result written to ${basedir}/${build.directory}/pmdReport4JavaEVA-${DSTAMP}_unusedcode.html</echo>
|
|
|
|
<!-- check for duplicated code -->
|
|
<echo>WARNING: use environment variable: ANT_OPTS=-Xmx512m or this task will fail.</echo>
|
|
<echo>Checking for duplicated code using the Copy/Paste Detector (CPD).</echo>
|
|
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" >
|
|
<classpath>
|
|
<pathelement path="${project.class.path}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</classpath>
|
|
</taskdef>
|
|
<cpd format="text" minimumTokenCount="200" outputFile="${build.directory}/duplicatedCodeReport4JavaEVA-${DSTAMP}.txt">
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</cpd>
|
|
<echo>result written to ${basedir}/${build.directory}/duplicatedCodeReport4JavaEVA-${DSTAMP}.txt</echo>
|
|
</target>
|
|
|
|
|
|
<target name="javancss" depends="init" description="SOFTWAREDESIGN: Determining the NCSS and CCN code metrics for JOELib.">
|
|
<echo>Starts JavaNCSS ...</echo>
|
|
<taskdef name="javancss" classname="javancss.JavancssAntTask">
|
|
<classpath>
|
|
<pathelement path="${project.class.path}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</classpath>
|
|
</taskdef>
|
|
<echo>Cyclomatic
|
|
Complexity Ease of Risk
|
|
Number (CCN) maintenance
|
|
(McCabe metric)
|
|
---------------------------------------------
|
|
1-10, simple easy minimum
|
|
11-20, complex moderate moderate
|
|
21-50, more complex hard high
|
|
>50, unstable very hard very high
|
|
|
|
</echo>
|
|
<javancss srcdir="${source.directory}"
|
|
includes="**/*.java"
|
|
excludes="jama/**/*.java, jmat/**/*.java, cformat/**/*.java"
|
|
abortOnFail="false"
|
|
ccnPerFuncMax="30"
|
|
generateReport="true"
|
|
outputfile="${build.directory}/javancssReport4JavaEVA-${DSTAMP}.txt"
|
|
format="text"
|
|
packageMetrics="true"
|
|
classMetrics="false"
|
|
functionMetrics="false"
|
|
/>
|
|
<echo>result written to ${basedir}/${build.directory}/javancssReport4JavaEVA-${DSTAMP}.txt</echo>
|
|
</target>
|
|
|
|
<target name="jalopy" description="SOFTWAREDESIGN: source code formatter using the JOELib convention.">
|
|
<taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
|
|
<classpath refid="project.class.path" />
|
|
</taskdef>
|
|
<jalopy classpathref="project.class.path"
|
|
fileformat="unix"
|
|
convention="../${source.directory}/jalopy.format.convention.xml"
|
|
history="file"
|
|
historymethod="adler32"
|
|
loglevel="error"
|
|
threads="2"
|
|
backup="bak">
|
|
<fileset dir="${source.directory}">
|
|
<include name="**/*.java"/>
|
|
</fileset>
|
|
</jalopy>
|
|
</target>
|
|
|
|
<target name="vizant" description="SOFTWAREDESIGN: create dependency graph for ANT files for the JOELib project.">
|
|
<echo>Starts VizANT ...</echo>
|
|
<taskdef name="vizant" classname="net.sourceforge.vizant.Vizant">
|
|
<classpath>
|
|
<pathelement path="${project.class.path}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</classpath>
|
|
</taskdef>
|
|
<vizant antfile="ant/build.xml" outfile="${build.directory}/vizant_build.dot">
|
|
<attrstmt type="node">
|
|
<attr name="style" value="filled"/>
|
|
<attr name="shape" value="egg"/>
|
|
<attr name="color" value="grey90"/>
|
|
</attrstmt>
|
|
</vizant>
|
|
<vizant antfile="ant/build.xml" outfile="${build.directory}/vizant_check.dot">
|
|
<attrstmt type="node">
|
|
<attr name="style" value="filled"/>
|
|
<attr name="shape" value="egg"/>
|
|
<attr name="color" value="grey90"/>
|
|
</attrstmt>
|
|
</vizant>
|
|
<!-- Here you will need GraphViz at http://www.research.att.com/sw/tools/graphviz/ -->
|
|
<!--
|
|
<exec executable="dot" ><arg line="-Tsvg ${build.directory}/vizant_build.dot -o ${build.directory}/vizant_build.svg"/></exec>
|
|
<exec executable="dot" ><arg line="-Tsvg ${build.directory}/vizant_check.dot -o ${build.directory}/vizant_check.svg"/></exec>
|
|
-->
|
|
<echo>result written to ${basedir}/${build.directory}/vizant_build.dot ...</echo>
|
|
<echo>result written to ${basedir}/${build.directory}/vizant_check.dot.</echo>
|
|
</target>
|
|
|
|
<target name="findbugs.calculate" depends="compile">
|
|
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
|
|
<classpath>
|
|
<pathelement location="${env.JAVA_HOME}/jre/lib/rt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/dt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar" />
|
|
<pathelement path="${project.class.path}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</classpath>
|
|
</taskdef>
|
|
<property name="findbugs.home" value="${basedir}/lib/findbugs" />
|
|
<findbugs home="${findbugs.home}"
|
|
output="xml"
|
|
outputFile="build/joelib-fb.xml" >
|
|
<auxClasspath>
|
|
<pathelement location="${env.JAVA_HOME}/jre/lib/rt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/dt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar" />
|
|
<pathelement path="${project.class.path}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</auxClasspath>
|
|
<sourcePath path="${basedir}/${source.directory}" />
|
|
<class location="${basedir}/${build.directory}" />
|
|
</findbugs>
|
|
</target>
|
|
|
|
<target name="findbugsGUI">
|
|
<property name="findbugs.home" value="${basedir}/lib/findbugs" />
|
|
<java classname="edu.umd.cs.findbugs.gui.FindBugsFrame" fork="yes"
|
|
dir="${build.directory}">
|
|
<classpath>
|
|
<pathelement location="${env.JAVA_HOME}/jre/lib/rt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/dt.jar" />
|
|
<pathelement location="${env.JAVA_HOME}/lib/tools.jar" />
|
|
<pathelement path="${project.class.path}" />
|
|
<fileset dir="${library.directory}">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
<fileset dir="${library.directory}/findbugs/lib">
|
|
<include name="*.jar" />
|
|
</fileset>
|
|
</classpath>
|
|
<jvmarg value="-Dfindbugs.home=${findbugs.home}"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="findbugs" depends="compile" description="SOFTWAREDESIGN: Run bug detector for JOELib and comfortable GUI to analyze results.">
|
|
<echo>Starts findBugs ...</echo>
|
|
<antcall target="findbugs.calculate"/>
|
|
<echo>result written to ${basedir}/${build.directory}/javaeva-fb.xml, now you can open this file with the findBugs GUI ...</echo>
|
|
<echo>open with 'File->LoadBugs' then open '${basedir}/${build.directory}/javaeva-fb.xml'.</echo>
|
|
<antcall target="findbugsGUI"/>
|
|
</target>
|
|
</project>
|
|
|
|
<!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
END OF FILE
|
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
|