-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
148 lines (124 loc) · 15 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0"?>
<!-- General project description -->
<project name="JSPF" default="all" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- Define different global variables -->
<property name="prefix" value="jspf"/>
<property name="version" value="1.0.3"/>
<!-- Define different roots -->
<property name="modules.root" value="modules/"/>
<property name="tools.root" value="modules/tools/"/>
<property name="build.root" value="ant.build/"/>
<property name="distribution.root" value="dist/"/>
<!-- Clear everything up -->
<target name="clean" description="Remove all previous build files">
<delete dir="${build.root}"/>
<delete dir="${distribution.root}"/>
<delete dir="documentation/api"/>
<mkdir dir="documentation/api"/>
</target>
<!-- Import other stuff -->
<import file="modules/core/build.xml"/>
<import file="modules/plugins/remote/build.xml"/>
<import file="modules/plugins/remote.xmlrpc/build.xml"/>
<import file="modules/plugins/remote.xmlrpcdelight/build.xml"/>
<import file="modules/plugins/remote.ermi/build.xml"/>
<import file="modules/plugins/remote.lipermi/build.xml"/>
<import file="modules/plugins/remote.javascript/build.xml"/>
<import file="modules/plugins/remote.json/build.xml"/>
<import file="modules/plugins/remote.discovery/build.xml"/>
<import file="modules/plugins/remote.bus/build.xml"/>
<import file="modules/tools/diagnosisreader/build.xml"/>
<!-- Build plugins -->
<target name="core" depends="clean, compile.core, pack.core"/>
<target name="remote" depends="clean, compile.remote, pack.remote"/>
<target name="remote.discovery" depends="clean, compile.remote.discovery, pack.remote.discovery"/>
<target name="remote.xmlrpc" depends="remote.discovery, clean, compile.remote.xmlrpc, pack.remote.xmlrpc"/>
<target name="remote.xmlrpcdelight" depends="remote.discovery, clean, compile.remote.xmlrpcdelight, pack.remote.xmlrpcdelight"/>
<target name="remote.ermi" depends="remote.discovery, clean, compile.remote.ermi, pack.remote.ermi"/>
<target name="remote.lipermi" depends="remote.discovery, clean, compile.remote.lipermi, pack.remote.lipermi"/>
<target name="remote.javascript" depends="remote.discovery, clean, compile.remote.javascript, pack.remote.javascript"/>
<target name="remote.json" depends="remote.discovery, clean, compile.remote.json, pack.remote.json"/>
<target name="diagnosisreader" depends="clean, compile.diagnosisreader, pack.diagnosisreader"/>
<!-- Run tests before we're done -->
<target name="test" description="Run all testcases" depends="core, remote, remote.xmlrpc, remote.ermi, remote.lipermi, remote.javascript, remote.json, remote.discovery">
<mkdir dir="${build.root}/tests/"/>
<!-- Compile all testcases -->
<javac srcdir="tests/src/" destdir="${build.root}/tests/" source="1.6" target="1.6">
<classpath>
<fileset dir="${distribution.root}/">
<filename name="*.jar"/>
</fileset>
<fileset dir="tests/dependencies/">
<filename name="*.jar"/>
</fileset>
</classpath>
</javac>
<!-- Jar testplugins -->
<jar destfile="${distribution.root}/${prefix}.testplugins-${version}.jar" basedir="${build.root}/tests/"/>
<!-- Run all testcases -->
<junit printsummary="true" haltonfailure="true" fork="true">
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="${build.root}/tests/" includes="**/*Test.class"/>
</batchtest>
<classpath>
<fileset dir="${distribution.root}/">
<include name="*.jar"/>
</fileset>
<fileset dir="tests/dependencies/">
<filename name="*.jar"/>
</fileset>
</classpath>
<classpath location="${build.root}/tests/"/>
</junit>
</target>
<!-- Documentation -->
<target name="documentation" depends="documentation.core, documentation.remote">
<javadoc access="public" author="true" classpath="modules/core/dependencies/jcores.jar:modules/tools/plugindoctor/dependencies/asm-util-3.2.jar:modules/plugins/remote.xmlrpc/dependencies/commons-logging-1.1.jar:modules/plugins/remote.json/dependencies/slf4j-jdk14-1.4.2.jar:modules/plugins/remote.discovery/dependencies/jmdns.jar:modules/plugins/remote.xmlrpcdelight/dependencies/XmlRpcDelight-all-2.3.0.jar:tests/plugins/coolplugin.jar:modules/plugins/remote.xmlrpc/dependencies/xmlunit1.0.jar:modules/tools/plugindoctor/dependencies/asm-analysis-3.2.jar:modules/core/dependencies/classworlds-1.0.mod.jar:modules/plugins/remote.json/dependencies/bcel-5.2.jar:modules/plugins/remote.json/dependencies/jabsorb-1.3.1.jar:modules/plugins/remote.javascript/dependencies/jetty-util-6.1.17.jar:modules/plugins/remote.ermi/dependencies/essence-rmi-1.03-mod.jar:modules/plugins/remote.xmlrpc/dependencies/rox-log4j.jar:modules/tools/plugindoctor/dependencies/jarjar-1.0.jar:modules/tools/plugindoctor/dependencies/asm-xml-3.2.jar:modules/tools/plugindoctor/dependencies/asm-tree-3.2.jar:modules/plugins/remote.lipermi/dependencies/lipermi.mod.jar:modules/plugins/remote.javascript/dependencies/dwr.jar:modules/plugins/remote.xmlrpcdelight/dependencies/xmlrpc-1.1_all.jar:modules/tools/plugindoctor/dependencies/jclasslib.jar:modules/plugins/remote.javascript/dependencies/servlet-api-2.5-20081211.jar:modules/plugins/remote.json/dependencies/slf4j-api-1.4.2.jar:modules/plugins/remote.javascript/dependencies/jetty-6.1.17.jar:modules/plugins/remote.xmlrpc/dependencies/rox.jar:/Applications/Eclipse 3.6/plugins/org.hamcrest.core_1.1.0.v20090501071000.jar:modules/tools/plugindoctor/dependencies/asm-3.2.jar:modules/plugins/remote.xmlrpc/dependencies/nanoxml-2.2.3.jar:/Applications/Eclipse 3.6/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/junit.jar:modules/tools/plugindoctor/dependencies/asm-commons-3.2.jar" destdir="documentation/api" doctitle="JSPF API" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="net.xeoh.plugins.base.annotations.injections,net.xeoh.plugins.base,net.xeoh.plugins.base.annotations.meta,net.xeoh.plugins.base.impl,net.xeoh.plugins.base.options.addpluginsfrom,net.xeoh.plugins.base.annotations,net.xeoh.plugins.informationbroker.options,net.xeoh.plugins.base.options.getplugin,net.xeoh.plugins.base.annotations.events,net.xeoh.plugins.informationbroker.util,net.xeoh.plugins.informationbroker.options.subscribe,net.xeoh.plugins.base.options,net.xeoh.plugins.base.annotations.configuration,net.xeoh.plugins.informationbroker.options.publish,net.xeoh.plugins.base.util" source="1.6" sourcefiles="modules/core/src/net/xeoh/plugins/informationbroker/InformationListener.java,modules/core/src/net/xeoh/plugins/informationbroker/InformationItem.java,modules/core/src/net/xeoh/plugins/base/util/uri/ClassURI.java,modules/core/src/net/xeoh/plugins/informationbroker/package-info.java,modules/core/src/net/xeoh/plugins/base/util/uri/package-info.java,modules/core/src/net/xeoh/plugins/package-info.java,modules/core/src/net/xeoh/plugins/informationbroker/InformationBroker.java" sourcepath="modules/plugins/remote.lipermi/src:modules/plugins/remote.xmlrpc/src:modules/plugins/remote.javascript/src:modules/tools/plugindoctor/src:modules/plugins/remote.json/src:modules/plugins/remote/src:modules/plugins/remote.ermi/src:modules/plugins/remote.discovery/src:modules/core/src:modules/plugins/remote.xmlrpcdelight/src:modules/core/example:tests/src" splitindex="true" use="true" version="true"/>
<!--javadoc access="public" author="true" classpath="modules/core/dependencies/jcores.jar:modules/tools/plugindoctor/dependencies/asm-util-3.2.jar:modules/plugins/remote.xmlrpc/dependencies/commons-logging-1.1.jar:modules/plugins/remote.json/dependencies/slf4j-jdk14-1.4.2.jar:modules/plugins/remote.discovery/dependencies/jmdns.jar:modules/plugins/remote.xmlrpcdelight/dependencies/XmlRpcDelight-all-2.3.0.jar:tests/plugins/coolplugin.jar:modules/plugins/remote.xmlrpc/dependencies/xmlunit1.0.jar:modules/tools/plugindoctor/dependencies/asm-analysis-3.2.jar:modules/core/dependencies/classworlds-1.0.mod.jar:modules/plugins/remote.json/dependencies/bcel-5.2.jar:modules/plugins/remote.json/dependencies/jabsorb-1.3.1.jar:modules/plugins/remote.javascript/dependencies/jetty-util-6.1.17.jar:modules/plugins/remote.ermi/dependencies/essence-rmi-1.03-mod.jar:modules/plugins/remote.xmlrpc/dependencies/rox-log4j.jar:modules/tools/plugindoctor/dependencies/jarjar-1.0.jar:modules/tools/plugindoctor/dependencies/asm-xml-3.2.jar:modules/tools/plugindoctor/dependencies/asm-tree-3.2.jar:modules/plugins/remote.lipermi/dependencies/lipermi.mod.jar:modules/plugins/remote.javascript/dependencies/dwr.jar:modules/plugins/remote.xmlrpcdelight/dependencies/xmlrpc-1.1_all.jar:modules/tools/plugindoctor/dependencies/jclasslib.jar:modules/plugins/remote.javascript/dependencies/servlet-api-2.5-20081211.jar:modules/plugins/remote.json/dependencies/slf4j-api-1.4.2.jar:modules/plugins/remote.javascript/dependencies/jetty-6.1.17.jar:modules/plugins/remote.xmlrpc/dependencies/rox.jar:/Applications/Eclipse 3.6/plugins/org.hamcrest.core_1.1.0.v20090501071000.jar:modules/tools/plugindoctor/dependencies/asm-3.2.jar:modules/plugins/remote.xmlrpc/dependencies/nanoxml-2.2.3.jar:/Applications/Eclipse 3.6/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/junit.jar:modules/tools/plugindoctor/dependencies/asm-commons-3.2.jar" destdir="documentation/api" doctitle="JSPF API" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="net.xeoh.plugins.base.annotations.injections,net.xeoh.plugins.base.annotations.meta,net.xeoh.plugins.informationbroker.standarditems.strings,net.xeoh.plugins.base.options.addpluginsfrom,net.xeoh.plugins.base.options,net.xeoh.plugins.informationbroker.standarditems,net.xeoh.plugins.informationbroker.options.publish,net.xeoh.plugins.base.util,net.xeoh.plugins.base,net.xeoh.plugins.informationbroker.standarditems.vanilla,net.xeoh.plugins.base.annotations,net.xeoh.plugins.informationbroker.options,net.xeoh.plugins.base.options.getplugin,net.xeoh.plugins.base.annotations.events,net.xeoh.plugins.informationbroker.standarditems.integer,net.xeoh.plugins.informationbroker.util,net.xeoh.plugins.informationbroker.options.subscribe,net.xeoh.plugins.base.util.uri,net.xeoh.plugins.base.annotations.configuration" source="1.6" sourcefiles="modules/core/src/net/xeoh/plugins/informationbroker/InformationItemIdentifier.java,modules/plugins/remote/src/net/xeoh/plugins/remote/PublishMethod.java,modules/core/src/net/xeoh/plugins/informationbroker/InformationListener.java,modules/core/src/net/xeoh/plugins/informationbroker/InformationItem.java,modules/plugins/remote/src/net/xeoh/plugins/remote/RemotePluginHandler.java,modules/plugins/remote/src/net/xeoh/plugins/remote/RemoteAPI.java,modules/plugins/remote/src/net/xeoh/plugins/remote/package-info.java,modules/core/src/net/xeoh/plugins/base/impl/PluginManagerFactory.java,modules/plugins/remote/src/net/xeoh/plugins/remote/ExportResult.java,modules/core/src/net/xeoh/plugins/informationbroker/package-info.java,modules/core/src/net/xeoh/plugins/base/impl/package-info.java,modules/core/src/net/xeoh/plugins/informationbroker/InformationBroker.java" sourcepath="modules/plugins/remote.lipermi/src:modules/plugins/remote.xmlrpc/src:modules/plugins/remote.javascript/src:modules/tools/plugindoctor/src:modules/plugins/remote.json/src:modules/plugins/remote/src:modules/plugins/remote.ermi/src:modules/plugins/remote.discovery/src:modules/core/src:modules/plugins/remote.xmlrpcdelight/src:modules/core/example:tests/src" splitindex="true" use="true" version="true"/ -->
</target>
<!-- Prepare distributables -->
<target name="preparepublish" description="Eventually generates distributable files" depends="core, remote, remote.xmlrpc, remote.xmlrpcdelight, remote.ermi, remote.lipermi, remote.javascript, remote.json, remote.discovery">
<delete dir="${build.root}"/>
<!-- Zip binary -->
<zip destfile="${distribution.root}/${prefix}-${version}.bin.zip">
<fileset dir=".">
<include name="documentation/**/*"/>
<include name="${distribution.root}/*core*"/>
<include name="${distribution.root}/*remote*"/>
<include name="${distribution.root}/*db*"/>
<include name="${distribution.root}/diagnosisreader"/>
</fileset>
</zip>
<!-- Zip sources -->
<zip destfile="${distribution.root}/${prefix}-${version}.src.zip">
<fileset dir=".">
<include name="**/*"/>
</fileset>
</zip>
</target>
<!-- Addressing Issue #26, Maven support. XML in here from Rick Herrick. Contact [email protected] for support. -->
<target name="maven">
<property name="groupId" value="net.xeoh.plugins"/>
<property name="artifactId" value="${prefix}.core"/>
<property name="libraryId" value="${artifactId}-${version}"/>
<!-- The whole pom/writepom/pom thing is to work around a bug in maven-ant-tasks: http://jira.codehaus.org/browse/MANTTASKS-170.
When this is fixed, the writepom and second pom can be removed and the in-memory pom can be used directly as below. -->
<!-- artifact:pom id="corepom" groupId="${groupId}" artifactId="${artifactId}" version="${version}" name="Java Simple Plugin Framework">
<dependency groupId="classworlds" artifactId="classworlds" version="1.0"/>
<dependency groupId="org.net.jcores" artifactId="jcores" version="0.8.0"/>
</artifact:pom -->
<artifact:pom id="corepomgen" groupId="${groupId}" artifactId="${artifactId}" version="${version}" name="Java Simple Plugin Framework">
<dependency groupId="classworlds" artifactId="classworlds" version="1.0"/>
<dependency groupId="org.net.jcores" artifactId="jcores" version="0.8.0"/>
</artifact:pom>
<artifact:writepom pomRefId="corepomgen" file="${distribution.root}/pom.xml"/>
<artifact:pom id="corepom" file="${distribution.root}/pom.xml"/>
<artifact:install file="${distribution.root}/${libraryId}.jar" pomRefId="corepom">
<attach file="${distribution.root}/${libraryId}-sources.jar" type="jar" classifier="sources"/>
<attach file="${distribution.root}/${libraryId}-javadoc.jar" type="jar" classifier="javadoc"/>
</artifact:install>
</target>
<!-- Pack plugins -->
<target name="all" depends="core, diagnosisreader, remote, remote.xmlrpc, remote.xmlrpcdelight, remote.ermi, remote.lipermi, remote.javascript, remote.json, remote.discovery, documentation, preparepublish"/>
</project>