WEB3/build.xml
2025-06-21 10:04:11 +03:00

76 lines
2.2 KiB
XML

<project name="jsf" default="build" basedir=".">
<property file="build.properties"/>
<target name="prepare">
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false" source="17" target="17">
<classpath>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</classpath>
</javac>
<copy todir="${build.dir}">
<fileset dir="${res.dir}"/>
</copy>
</target>
<target name="build" depends="compile">
<war destfile="${dist.dir}/${war.name}" webxml="${web.dir}/WEB-INF/web.xml" manifest="src/main/resources/META-INF/MANIFEST.MF">
<fileset dir="${web.dir}">
<exclude name="WEB-INF/web.xml"/>
</fileset>
<lib dir="${lib.dir}"/>
<classes dir="${build.dir}"/>
</war>
</target>
<target name="compile-tests" depends="compile">
<mkdir dir="${build.dir}/test-classes"/>
<javac srcdir="${test.dir}" destdir="${build.dir}/test-classes" includeantruntime="false" source="17" target="17">
<classpath>
<pathelement path="${build.dir}"/>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="test" depends="compile-tests">
<mkdir dir="test-reports"/>
<junit printsummary="yes" haltonfailure="yes" fork="true">
<classpath>
<pathelement path="${build.dir}/test-classes"/>
<pathelement path="${build.dir}"/>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</classpath>
<batchtest todir="test-reports">
<fileset dir="${test.dir}" includes="**/*Test.java"/>
</batchtest>
<formatter type="plain"/>
<formatter type="xml"/>
</junit>
</target>
<target name="xml">
<xmlvalidate lenient="true" failonerror="yes">
<fileset dir="." includes="**/*.xml" />
</xmlvalidate>
</target>
<target name="history">
<antcall target="clean" />
<exec executable="bash">
<env key="DIFF_FILE" value="${history.diff.file}"/>
<arg value="${history.script}"/>
</exec>
</target>
</project>