Skip to content

Commit

Permalink
Updated build.xml, now works as a proper ANT file.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhollomon committed Feb 17, 2023
1 parent f40c5be commit d0436d6
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions SimpleWebServer/build.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
<project name="WebServer" default="jacocoreport" xmlns:jacoco="antlib:org.jacoco.ant">
<!-- Ant build file for SimpleWebServer. Contains build, run, and clean;
should run automatically when compiled with Ant.
-->

<!-- Make sure to make a build, run, and clean; modifying prebuilt one should work -->
<project name="WebServer" default="run">
<property name="src" location="src/"/>
<property name="build" location="bin/"/>

<!-- Delete class files directory -->
<target name="clean">
<delete dir="${build}"/>
</target>

<!-- Compile files to bin folder -->
<target name="build">
<mkdir dir="${build}"/>
<javac srcdir="${src}" includeantruntime="true" destdir="${build}"/>
</target>

<target name="cleanbuild" depends="clean,build"/>

<target name="run" depends="clean,build,newrun"/>

<!-- Runs compiled files -->
<target name="newrun">
<java classname="edu.nmsu.cs.webserver.WebServer" classpath="${build}" fork="true" dir="${basedir}">
<arg value="8080"/>
</java>
</target>

</project>

0 comments on commit d0436d6

Please sign in to comment.