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
86
87
88
89<?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.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project
xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1"
xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3"
name="CH9K" default="default" basedir=".">
<description>Builds, tests, and runs the project CH9K.</description>
<import file="nbproject/build-impl.xml"/>
<!--<target depends="" name="-pre-init">
<exec executable="git" outputproperty="git.revision">
<arg value="describe" />
</exec>
</target> -->
<!-- copy of the the -do-jar-with-libraries from build-impl.xml -->
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<property location="${src.resources.dir}" name="src.resources.dir.resolved"/>
<pathconvert property="run.classpath.without.build.classes.dir">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to=""/>
<map from="${src.resources.dir.resolved}" to=""/>
</pathconvert>
<pathconvert pathsep=" " property="jar.classpath">
<path path="${run.classpath.without.build.classes.dir}"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
<copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}">
<include name="ch9k/**/*" />
</fileset>
<fileset dir="${src.resources.dir}">
<include name="ch9k/**/*" />
<include name="*.properties" />
</fileset>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</copylibs>
</target>
<!-- build JARs for all plugins -->
<target depends="init,jar" name="plugins" description="Build plugin JARs.">
<macrodef name="build-plugin">
<attribute name="package"/>
<attribute name="destination"/>
<sequential>
<jar compress="${jar.compress}" jarfile="${dist.jar.dir}/@{destination}.jar" manifest="${build.classes.dir}/@{package}/${manifest.file}">
<fileset dir="${build.classes.dir}">
<include name="@{package}/**/*.class" />
</fileset>
<fileset dir="${src.resources.dir}">
<include name="@{package}/**/*" />
<include name="*.properties" />
</fileset>
</jar>
</sequential>
</macrodef>
<build-plugin package="be/jaspervdj/googleimage" destination="googleimage"/>
<build-plugin package="be/jaspervdj/wordcloud" destination="wordcloud"/>
<build-plugin package="be/ugent/zeus" destination="dummyplugin"/>
<build-plugin package="be/thinkjavache/snitch" destination="snitch"/>
</target>
<!-- remove doc-dirs when cleaning -->
<target name="-post-clean">
<delete dir="${dist.javadoc.dir}"/>
</target>
<!-- create mac package -->
<target depends="init,jar" name="package" description="Build a Mac .app package">
<taskdef name="jarbundler" classname="net.sourceforge.jarbundler.JarBundler" />
<delete dir="${dist.jar.dir}/ChatHammer 9000.app"/>
<jarbundler dir="${dist.jar.dir}" mainclass="${main.class}"
name="ChatHammer 9000" bundleid="be.ch9k" signature="CH9K"
version="${git.revision}" jvmversion="1.6+">
<jarfileset dir="${dist.jar.dir}" includes="**/*.jar" />
</jarbundler>
</target>
</project>