forked from landawn/streamex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
84 lines (69 loc) · 3.32 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
<!-- StreamEx ant built script -->
<project name="streamex" default="jar" basedir=".">
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it) -->
<property file="build.properties" />
<path id="build.class.path">
<pathelement location="${build.classes.dir}" />
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="**/*.jar" />
</fileset>
</path>
<patternset id="support.files">
<include name="**/*.jpg" />
<include name="**/*.gif" />
<include name="**/*.dtd" />
<include name="**/*.xsd" />
<include name="**/*.xml" />
<include name="**/*.xslt" />
<include name="**/*.wsdl" />
<!-- exclude everything we don't want in the jar -->
<exclude name="${build.dir}/**/*" />
<exclude name="${docs.dir}/**/*" />
<exclude name="classes/**/*" />
<exclude name="**/*.properties" />
<exclude name="**/*.ccf" />
<exclude name="**/*.cfg.xml" />
<exclude name="**/ehcache.xml" />
<exclude name="build.xml" />
<exclude name="build.properties" />
</patternset>
<tstamp>
<format property="current.date" pattern="yyyyMMdd" />
</tstamp>
<target name="clean">
<delete includeEmptyDirs="true">
<fileset dir="${build.classes.dir}" includes="**/*" />
</delete>
</target>
<target name="prepare">
<mkdir dir="${build.classes.dir}" />
</target>
<target name="compile" depends="clean,prepare" description="Compile the Java source code">
<available classname="org.eclipse.core.launcher.Main" property="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" classpath="${java.class.path}" />
<javac srcdir="${src.dir}" destdir="${build.classes.dir}" classpathref="build.class.path" debug="on" source="1.8" target="1.8">
</javac>
</target>
<!-- Some of this can probably be moved to common-build... -->
<target name="jar" depends="compile" description="Build the distribution .jar file">
<delete file="${dist.dir}/${project-name}-${version}.jar" />
<jar filesetmanifest="merge" jarfile="${dist.dir}/${project-name}-${version}.jar" basedir="${build.classes.dir}" />
</target>
<!-- Some of this can probably be moved to common-build... -->
<target name="jar-scr" description="Build the src .jar file">
<delete file="$${dist.dir}/${project-name}-${version}-sources.jar" />
<jar filesetmanifest="merge" jarfile="${dist.dir}/${project-name}-${version}-sources.jar" basedir="${src.dir}" />
</target>
<target name="javadoc" description="Compile the Javadoc API documentation to dist dir">
<delete dir="${docs.dir}/${project-name}-${version}-javadoc" />
<mkdir dir="${docs.dir}/${project-name}-${version}-javadoc" />
<javadoc packagenames="Abacus" access="public" destdir="${docs.dir}/${project-name}-${version}-javadoc" use="true" protected="false" version="true" windowtitle="${project-name} API Documentation" Overview="${docs}/${project-name}-${version}-javadoc/package.html" doctitle="${project-name} API Documentation" Locale="en_US" link="${javadoc}">
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="com/landawn/streamex/**" />
<exclude name="com/landawn/streamex/util/MoreObjects.java" />
</fileset>
</javadoc>
<jar filesetmanifest="merge" jarfile="${dist.dir}/${project-name}-${version}-javadoc.jar" basedir="${docs.dir}/${project-name}-${version}-javadoc" />
</target>
</project>