-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
73 lines (61 loc) · 2.63 KB
/
build.xml
File metadata and controls
73 lines (61 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0"?>
<project name="Static_Analysis_Extension" default="main" basedir=".">
<!-- Sets variables which can later be used. -->
<!-- The value of a property is accessed via ${} -->
<property name="src.dir" location="src/main" />
<property name="src.lib" location="src/main/resources" />
<property name="build.dir" location="bin" />
<property name="dist.dir" location="dist" />
<property name="docs.dir" location="docs" />
<property name="version.num" value="1.0.0"/>
<buildnumber file="build.num"/>
<path id="build.classpath">
<fileset dir="${src.lib}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<!-- Deletes the existing build, docs and dist directory-->
<target name="clean">
<!--<delete file="MANIFEST.MF"/>-->
<delete dir="${build.dir}" />
<delete dir="${docs.dir}" />
<delete dir="${dist.dir}" />
<delete dir="**/*.idea"/>
</target>
<!-- Creates the build, docs and dist directory-->
<target name="makedir">
<mkdir dir="${build.dir}" />
<mkdir dir="${docs.dir}" />
<mkdir dir="${dist.dir}" />
</target>
<!-- Compiles the java code (including the usage of library for JUnit -->
<target name="compile" depends="clean, makedir" description="compile the source" >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="build.classpath"
debug="on" includeantruntime="false" encoding="cp1252"
memoryinitialsize="1024m" memorymaximumsize="1024m" fork="yes">
<compilerarg value="-Xlint"/>
</javac>
</target>
<!-- Creates Javadoc -->
<target name="docs" depends="compile">
<javadoc packagenames="src" sourcepath="${src.dir}" destdir="${docs.dir}">
<!-- Define which files / directory should get included, we include all -->
<fileset dir="${src.dir}">
<include name="**" />
</fileset>
</javadoc>
</target>
<!--Creates the deployable jar file -->
<target name="jar" depends="compile">
<manifest file="MANIFEST.MF">
<attribute name="Main-Class" value="main.java.mainGui.StaticAnalysisExtension"/>
</manifest>
<jar destfile="${dist.dir}/static-code-analysis-${version.num}.jar" manifest="MANIFEST.MF" basedir="${build.dir}" includes="**/*.class">
</jar>
</target>
<target name="main" depends="compile, jar, docs">
<description>Main target</description>
</target>
</project>