Got my hands on an old script from year 2000.
It’s all in Java and there is a build file which compiles it all:
<?xml version="1.0"?>
<project name="chat" default="compile" basedir=".">
<target name="init">
<property name="conf.dir" value="conf" />
<property name="src.dir" value="src" />
<property name="resource.dir" value="resource" />
<property name="build.dir" value="build" />
<property name="release.dir" value="release" />
<property name="etc.dir" value="etc" />
<property name="lib.dir" value="lib" />
</target>
<target name="clean" depends="init">
<delete dir="${build.dir}" />
<delete dir="${release.dir}" />
</target>
<target name="compile" depends="init">
<mkdir dir="${build.dir}" />
<javac srcdir="${src.dir}" destdir="${build.dir}" includeAntRuntime="false" debug="true" optimize="false" />
</target>
<target name="release" depends="compile">
<mkdir dir="${release.dir}" />
<jar destfile="${release.dir}/chat_service.jar" basedir="${build.dir}" includeantruntime="false" />
</target>
</project>
When I run it with ant in Windows the command prompt says:
Buildfile: build.xml
init:
compile: BUILD SUCCESSFUL
But it doesn’t create a jar file.
All it does is copy the exact project and compile it into class files.
Does anyone know how I can create the right file?
It’s a chat server and I need it to run my client.
The default target of the build file is
compile:So if you invoke ant without specifying a target, the
compiletarget will be executed. To execute thereleasetarget, use