]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.core/src/main/config/include/ant/slc-factory-targets.xml
6 <project default=
"all">
7 <!-- TO BE OVERRIDDEN -->
8 <property name=
"package.type" value=
"I" />
9 <property name=
"main.artifact" value=
"${package.prefix}" />
10 <property name=
"test.artifact" value=
"${package.prefix}-test" />
12 <property name=
"main.srcdir" location=
"src/main/java" />
13 <property name=
"main.libdir" location=
"lib" />
14 <property name=
"main.libdir-src" location=
"lib-src" />
15 <property name=
"test.srcdir" location=
"src/test/java" />
17 <property name=
"package.base" location=
"target/package/" />
19 <property name=
"dist.base" location=
"target/dist/" />
20 <property name=
"dist.doc" location=
"${dist.base}/doc" />
21 <property name=
"dist.lib" location=
"${dist.base}/lib" />
22 <property name=
"dist.lib-src" location=
"${dist.base}/lib-src" />
23 <property name=
"dist.build" location=
"${dist.base}/build" />
24 <property name=
"dist.junit" location=
"${dist.build}/junit" />
25 <property name=
"dist.appli" location=
"${dist.base}/appli" />
27 <property name=
"dist.jar" location=
"target/jar" />
29 <property name=
"compile.base" location=
"target/compile" />
30 <property name=
"slc.base" location=
"target/slc" />
33 <fileset dir=
"${main.libdir}">
34 <include name=
"**/*.jar" />
39 <fileset dir=
"${main.libdir}">
40 <include name=
"**/*.jar" />
42 <pathelement location=
"${dist.jar}/${main.artifact}.jar" />
45 <import file=
"slc-factory-macrodefs.xml" />
47 <target name=
"all" depends=
"dist.package">
48 <echo message=
"Build of ${package.name} completed" />
49 <record name=
"${dist.build}/build.log" action=
"stop" />
52 <target name=
"basePackage" depends=
"dist.basePackage">
53 <echo message=
"Build of ${package.name} completed" />
54 <record name=
"${dist.build}/build.log" action=
"stop" />
58 <delete dir=
"${dist.jar}" />
59 <delete dir=
"${slc.base}" />
60 <delete dir=
"${dist.base}" />
61 <delete dir=
"${package.base}" />
62 <delete dir=
"${compile.base}" />
67 <!-- To be overriden -->
70 <target name=
"init.internal">
71 <mkdir dir=
"${dist.build}"/>
72 <record name=
"${dist.build}/build.log" action=
"start" append=
"true"/>
73 <fail unless=
"package.version"
74 message=
"Property 'package.version' must be set" />
75 <fail unless=
"package.prefix"
76 message=
"Property 'package.prefix' must be set" />
79 <format property=
"package.tstamp" pattern=
"yyMMddHHmmss" />
81 <property name=
"package.releaseId"
82 value=
"${package.version}.${package.tstamp}${package.type}" />
84 <property name=
"package.name"
85 value=
"${package.prefix}-${package.releaseId}" />
86 <property name=
"basePackage.name" value=
"${package.prefix}-base" />
88 <mkdir dir=
"${dist.jar}" />
89 <mkdir dir=
"${slc.base}" />
90 <mkdir dir=
"${dist.base}" />
91 <mkdir dir=
"${dist.lib-src}" />
92 <mkdir dir=
"${package.base}" />
93 <mkdir dir=
"${compile.base}" />
95 <echo message=
"Build of ${package.name} started." />
98 <target name=
"init.slcbase" if=
"slc.basePackage">
99 <unzip dest=
"${slc.base}" src=
"${slc.basePackage}" />
101 <copy todir=
"${dist.base}" overwrite=
"true" verbose=
"true">
102 <fileset dir=
"${slc.base}">
103 <include name=
"doc/argeo-slc/**" />
104 <include name=
"bin/*" />
108 <copy todir=
"${main.libdir}" overwrite=
"true" verbose=
"true">
109 <fileset dir=
"${slc.base}/lib">
113 <copy todir=
"${main.libdir-src}" overwrite=
"true" verbose=
"true">
114 <fileset dir=
"${slc.base}/lib-src">
120 <target name=
"build.main" depends=
"init.internal,init.slcbase,init">
121 <compile artifact=
"${main.artifact}" srcdir=
"${main.srcdir}" />
124 <target name=
"jar.main" depends=
"build.main">
125 <createJar artifact=
"${main.artifact}" srcdir=
"${main.srcdir}" />
128 <target name=
"build.test" depends=
"jar.main">
129 <compile artifact=
"${test.artifact}"
130 srcdir=
"${test.srcdir}"
131 classpathref=
"cp.test" />
134 <target name=
"jar.sources" unless=
"flag.noSources">
135 <createSourcesJar artifact=
"${main.artifact}" srcdir=
"${main.srcdir}" />
138 <target name=
"jar.test" depends=
"build.test">
139 <createJar artifact=
"${test.artifact}" srcdir=
"${test.srcdir}" />
142 <target name=
"dist.unittest" depends=
"jar.test">
143 <mkdir dir=
"${dist.junit}/xml" />
144 <junit printsummary=
"yes" haltonfailure=
"no">
146 <path refid=
"cp.test" />
147 <path location=
"${dist.jar}/${test.artifact}.jar" />
150 <formatter type=
"xml" />
152 <batchtest fork=
"yes" todir=
"${dist.junit}/xml">
153 <fileset dir=
"${test.srcdir}">
154 <include name=
"**/*Test*.java" />
155 <exclude name=
"**/Abstract*.java" />
156 <exclude name=
"**/*TestDef*.java" />
157 <exclude name=
"**/*TestData*.java" />
162 <junitreport todir=
"${dist.junit}">
163 <fileset dir=
"${dist.junit}/xml">
164 <include name=
"*.xml" />
166 <report format=
"frames" todir=
"${dist.junit}" />
170 <target name=
"package.common"
171 depends=
"dist.unittest,jar.sources,dist.api,dist.apiWithSlc,dist.dependencies,dist.appli">
174 <target name=
"dist.package" depends=
"package.common">
175 <copy todir=
"${dist.base}">
176 <fileset dir=
"src/main/config" includes=
"**/*" />
178 <copy todir=
"${dist.lib}">
179 <fileset dir=
"${dist.jar}" includes=
"*.jar" excludes=
"*-test.jar" />
182 <zip destfile=
"${package.base}/${package.name}.zip">
183 <zipfileset dir=
"${dist.base}"
184 prefix=
"${package.prefix}-${package.version}">
185 <include name=
"**/*" />
190 <target name=
"dist.basePackage" depends=
"package.common">
191 <copy todir=
"${dist.base}">
192 <fileset dir=
"src/main/config" includes=
"**/*" />
194 <copy todir=
"${dist.lib}">
195 <fileset dir=
"${dist.jar}" includes=
"*.jar" excludes=
"*-test.jar" />
198 <zip destfile=
"${package.base}/${basePackage.name}.zip">
199 <zipfileset dir=
"${dist.base}">
200 <exclude name=
"build/**" />
201 <include name=
"**/*" />
206 <target name=
"dist.dependencies" if=
"flag.withDependencies">
207 <copy todir=
"${dist.lib}">
208 <fileset dir=
"${main.libdir}" includes=
"*.jar" />
213 <target name=
"dist.appli" if=
"appli.base">
214 <copy todir=
"${dist.appli}">
215 <fileset dir=
"${appli.base}" includes=
"**" />
220 <target name=
"dist.api" unless=
"slc.basePackage">
221 <api artifact=
"${main.artifact}" srcdir=
"${main.srcdir}" />
225 <target name=
"dist.apiWithSlc" if=
"slc.basePackage">
226 <api artifact=
"${main.artifact}" srcdir=
"${main.srcdir}">
228 <link href=
"../../argeo-slc/api" />