-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
85 lines (78 loc) · 3.78 KB
/
build.xml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="DLCopy" default="default" basedir=".">
<description>Builds, tests, and runs the project DLCopy.</description>
<import file="nbproject/build-impl.xml"/>
<!-- Our own Jar Building Target -->
<target depends="init,compile,-pre-jar,-do-jar,-post-jar,bin-jar,full-jar"
description="Build JAR." name="jar"/>
<target name="bin-jar" depends="init,compile,-pre-pre-jar">
<jar destfile="dist/DLCopy.jar" basedir="build/classes/">
<zipfileset src="${reference.JBackpack.jar}" excludes="META-INF/**"/>
<zipfileset src="${reference.lernstickTools.jar}" excludes="META-INF/**"/>
<zipfileset src="libs/jh.jar" excludes="META-INF/**"/>
<zipfileset src="libs/derby.jar" excludes="META-INF/**"/>
<zipfileset
src="${file.reference.java_file_copy_library-0.9.7.jar}"
excludes="META-INF/**"/>
<manifest>
<attribute name="Class-Path" value="/usr/share/java/dbus.jar /usr/share/java/unix.jar /usr/share/java/hexdump.jar"/>
<attribute name="Main-Class" value="ch.fhnw.dlcopy.DLCopy"/>
</manifest>
</jar>
</target>
<target name="full-jar" depends="init,compile,-pre-pre-jar">
<jar destfile="dist/DLCopy_full.jar" basedir="build/classes/">
<zipfileset src="${reference.JBackpack.jar}" excludes="META-INF/**"/>
<zipfileset src="${reference.lernstickTools.jar}" excludes="META-INF/**"/>
<zipfileset src="libs/jh.jar" excludes="META-INF/**"/>
<zipfileset src="libs/derby.jar" excludes="META-INF/**"/>
<zipfileset
src="${file.reference.java_file_copy_library-0.9.7.jar}"
excludes="META-INF/**"/>
<manifest>
<attribute name="Class-Path" value="/usr/share/java/dbus.jar /usr/share/java/unix.jar /usr/share/java/hexdump.jar"/>
<attribute name="Main-Class" value="ch.fhnw.dlcopy.DLCopy"/>
</manifest>
</jar>
<jar destfile="dist/DLCopy_full.jar" basedir="src" update="true"/>
</target>
<target name="1_debian_packages">
<!-- build debian package -->
<exec executable="dpkg-buildpackage">
<arg value="-mronny.standtke@fhnw.ch"/>
</exec>
<exec executable="fakeroot">
<arg value="debian/rules"/>
<arg value="clean"/>
</exec>
</target>
<target name="2_check_strings">
<exec executable="sh">
<arg value="check_strings.sh"></arg>
</exec>
</target>
<target name="3_sort_strings">
<exec executable="sh">
<arg value="sort_strings.sh"></arg>
</exec>
</target>
<target name="checkstyle" description="Generates a report of code convention violations.">
<taskdef name="checkstyle"
classname="com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask"
classpath="/usr/share/java/checkstyle.jar"/>
<property name="check.config" location="config/checkstyle/checks.xml"/>
<checkstyle config="${check.config}"
executeIgnoredModules="true"
failureProperty="checkstyle.failure.property"
failOnViolation="false">
<formatter type="xml" tofile="checkstyle_report.xml"/>
<fileset dir="src" includes="**/*.java"/>
<classpath path="/usr/share/java/checkstyle.jar"/>
</checkstyle>
<style in="checkstyle_report.xml" out="checkstyle_report.html"
style="checkstyle.xsl"/>
</target>
</project>