-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aggiunto file ant per compilare ed eseguire l'app
- Loading branch information
Showing
3 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<project name="Port-scans-detector-with-prolog" basedir="." default="main"> | ||
|
||
|
||
<property name="src.dir" value="src"/> | ||
|
||
<property name="build.dir" value="build"/> | ||
<property name="classes.dir" value="${build.dir}/classes"/> | ||
<property name="jar.dir" value="${build.dir}/jar"/> | ||
<property name="lib.dir" value="lib/"/> | ||
<property name="main-class" value="ids.Main"/> | ||
|
||
|
||
<path id="classpath"> | ||
<fileset dir="${lib.dir}" includes="**/*.jar"/> | ||
</path> | ||
|
||
|
||
|
||
<target name="clean"> | ||
<delete dir="${build.dir}"/> | ||
</target> | ||
|
||
<target name="compile"> | ||
<mkdir dir="${classes.dir}"/> | ||
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/> | ||
</target> | ||
|
||
<target name="run" depends="jar"> | ||
<java fork="true" classname="${main-class}"> | ||
<classpath> | ||
<path refid="classpath"/> | ||
<path location="project.jar"/> | ||
</classpath> | ||
<arg line="${kb} ${num_conn} ${file} ${retract}"/> | ||
</java> | ||
</target> | ||
|
||
<target name="jar" depends="compile"> | ||
<jar destfile="project.jar" basedir="${classes.dir}"> | ||
<manifest> | ||
<attribute name="Main-Class" value="${main-class}"/> | ||
<attribute name="Class-Path" value="${lib.dir}/jpcap.jar:${lib.dir}/2p.jar"/> | ||
</manifest> | ||
</jar> | ||
</target> | ||
|
||
<target name="clean-build" depends="clean,jar"/> | ||
|
||
<target name="main" depends="clean,run"/> | ||
|
||
</project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
javac -cp project.jar -classpath lib/2p.jar:lib/jpcap.jar src/ids/*.java | ||
javac -classpath lib/2p.jar:lib/jpcap.jar ids/*.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters