svnno****@sourc*****
svnno****@sourc*****
2009年 12月 17日 (木) 18:34:52 JST
Revision: 70 http://sourceforge.jp/projects/ngms/svn/view?view=rev&revision=70 Author: takayah Date: 2009-12-17 18:34:52 +0900 (Thu, 17 Dec 2009) Log Message: ----------- [NMNetWalker] rewrite build.xml Modified Paths: -------------- trunk/source/NMNetWalker/build.xml Added Paths: ----------- trunk/source/NMNetWalker/test/ Modified: trunk/source/NMNetWalker/build.xml =================================================================== --- trunk/source/NMNetWalker/build.xml 2009-12-17 08:16:05 UTC (rev 69) +++ trunk/source/NMNetWalker/build.xml 2009-12-17 09:34:52 UTC (rev 70) @@ -1,72 +1,61 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- WARNING: Eclipse auto-generated file. - Any modifications will be overwritten. - To include a user specific buildfile here, simply create one in the same - directory with the processing instruction <?eclipse.ant.import?> - as the first entry and export the buildfile again. --> -<project basedir="." default="build" name="NMNetWalker"> - <property environment="env"/> - <property name="ECLIPSE_HOME" value="../../../../../../../Applications/eclipse"/> - <property name="NMTree.location" value="../NMTree"/> - <property name="debuglevel" value="source,lines,vars"/> - <property name="target" value="1.5"/> - <property name="source" value="1.5"/> - <path id="Scala Library version 2.7.7.final.libraryclasspath"> - <pathelement location="${ECLIPSE_HOME}/configuration/org.eclipse.osgi/bundles/197/1/.cp/lib/scala-library.jar"/> - <pathelement location="${ECLIPSE_HOME}/configuration/org.eclipse.osgi/bundles/197/1/.cp/lib/scala-dbc.jar"/> - <pathelement location="${ECLIPSE_HOME}/configuration/org.eclipse.osgi/bundles/197/1/.cp/lib/scala-swing.jar"/> - </path> - <path id="NMTree.classpath"> - <pathelement location="${NMTree.location}/bin"/> - <path refid="Scala Library version 2.7.7.final.libraryclasspath"/> - </path> - <path id="NMNetWalker.classpath"> - <pathelement location="bin"/> - <path refid="Scala Library version 2.7.7.final.libraryclasspath"/> - <path refid="NMTree.classpath"/> - </path> - <target name="init"> - <mkdir dir="bin"/> - <copy includeemptydirs="false" todir="bin"> - <fileset dir="src"> - <exclude name="**/*.launch"/> - <exclude name="**/*.java"/> - </fileset> - </copy> - </target> - <target name="clean"> - <delete dir="bin"/> - </target> - <target depends="clean" name="cleanall"> - <ant antfile="${NMTree.location}/build.xml" dir="${NMTree.location}" inheritAll="false" target="clean"/> - </target> - <target depends="build-subprojects,build-project" name="build"/> - <target name="build-subprojects"> - <ant antfile="${NMTree.location}/build.xml" dir="${NMTree.location}" inheritAll="false" target="build-project"> - <propertyset> - <propertyref name="build.compiler"/> - </propertyset> - </ant> - </target> - <target depends="init" name="build-project"> - <echo message="${ant.project.name}: ${ant.file}"/> - <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}"> - <src path="src"/> - <classpath refid="NMNetWalker.classpath"/> - </javac> - </target> - <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/> - <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler"> - <copy todir="${ant.library.dir}"> - <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> - </copy> - <unzip dest="${ant.library.dir}"> - <patternset includes="jdtCompilerAdapter.jar"/> - <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> - </unzip> - </target> - <target description="compile project with Eclipse compiler" name="build-eclipse-compiler"> - <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> - <antcall target="build"/> - </target> -</project> +<?xml version="1.0"?> +<project name="ngms" default="all" basedir="."> + <target name="initialize"> + <property environment="env" /> + <property name="scala.home" value="${env.SCALA_HOME}/" /> + <property name="src.dir" value="${basedir}/src" /> + <property name="build.dir" value="${basedir}/bin" /> + <property name="lib.dir" value="${basedir}/../../lib/" /> + <property name="scala-library.jar" value="${scala.home}/lib/scala-library.jar" /> + <property name="scalatest-library.jar" value="${lib.dir}/scalatest/1.0/scalatest-1.0.jar" /> + <property name="snmp4j-library.jar" value="${lib.dir}/snmp4j/1.10.2/snmp4j-1.10.2.jar" /> + <property name="log4j-library.jar" value="${lib.dir}/log4j/1.2.14/log4j-1.2.14.jar" /> + <property name="nmtree.dir" value="${basedir}/../NMTree/bin" /> + <path id="build.classpath"> + <pathelement location="${build.dir}"/> + <pathelement location="${nmtree.dir}"/> + <pathelement location="${scala-library.jar}"/> + <pathelement location="${scalatest-library.jar}"/> + <pathelement location="${snmp4j-library.jar}"/> + <pathelement location="${log4j-library.jar}"/> + </path> + <taskdef resource="scala/tools/ant/antlib.xml"> + <classpath> + <pathelement location="${scala.home}/lib/scala-compiler.jar" /> + <pathelement location="${scala-library.jar}"/> + </classpath> + </taskdef> + + </target> + + <target name="compile" depends="initialize"> + <mkdir dir="${build.dir}"/> + <scalac srcdir="${src.dir}" destdir="${build.dir}" classpathref="build.classpath"/> + </target> + + <target name="test" depends="initialize"> + <property name="test.dir" value="${basedir}/test" /> + <scalac srcdir="${test.dir}" destdir="${build.dir}" classpathref="build.classpath"/> + + <taskdef name="scalatest" classname="org.scalatest.tools.ScalaTestTask"> + <classpath refid="build.classpath"/> + </taskdef> + + <scalatest> + <reporter type="file" filename="testlog.txt"/> + <runpath location="${build.dir}"/> + </scalatest> + </target> + + <target name="doc" depends="initialize"> + <mkdir dir="${basedir}/doc"/> + <scaladoc srcdir="${src.dir}" destdir="${basedir}/doc" + deprecation="yes" doctitle="NMNetWalker API" + classpathref="build.classpath"> + </scaladoc> + </target> + + <target name="all" depends="compile,test"> + </target> + +</project>