source: release-kits/lirk3/ant-scripts/create-components.xml@ 17422

Last change on this file since 17422 was 17422, checked in by oranfry, 13 years ago

made the create-components targets more stable

File size: 4.0 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="lirk3-create-components" default="create-components">
3
4 <!-- create components from the distribution folder -->
5 <target name="create-components">
6 <antcall target="prepare-to-create-components" />
7 <antcall target="create-core-component" />
8 <antcall target="create-sourcecode-component" />
9 <antcall target="create-ant-component" />
10 <antcall target="create-tomcat-component" />
11 </target>
12
13 <target name="prepare-to-create-components">
14 <delete dir="components"/>
15 <mkdir dir="components/tmp"/>
16 </target>
17
18 <target name="create-core-component">
19 <antcall target="prepare-core-component" />
20 <antcall target="compress-core-component" />
21 </target>
22
23 <target name="create-sourcecode-component">
24 <antcall target="prepare-sourcecode-component" />
25 <antcall target="compress-sourcecode-component" />
26 </target>
27
28 <target name="create-ant-component">
29 <antcall target="prepare-ant-component" />
30 <antcall target="compress-ant-component" />
31 </target>
32
33 <target name="create-tomcat-component">
34 <antcall target="prepare-tomcat-component" />
35 <antcall target="compress-tomcat-component" />
36 </target>
37
38 <target name="prepare-core-component">
39
40 <mkdir dir="components/tmp/core"/>
41
42 <copy todir="components/tmp/core" overwrite="true">
43 <fileset dir="distribution/greenstone3">
44 <include name="**/*"/>
45
46 <!-- exclude sourcecode -->
47 <include name="src/**/*"/>
48 <exclude name="gs2build/common-src/**/*"/>
49 <exclude name="gs2build/build-src/**/*"/>
50 <exclude name="gs2build/runtime-src/**/*"/>
51
52 <!-- exclude ant -->
53 <exclude name="packages/ant/**/*"/>
54
55 <!-- exclude tomcat -->
56 <exclude name="packages/tomcat/**/*"/>
57
58 </fileset>
59 </copy>
60
61 <!-- do some cleanup -->
62 <delete dir="components/tmp/core/gs2build/common-src"/>
63 <delete dir="components/tmp/core/gs2build/build-src"/>
64 <delete dir="components/tmp/core/gs2build/runtime-src"/>
65 <delete dir="components/tmp/core/gs2build/bin/windows/imagemagick"/>
66 <delete dir="components/tmp/core/gs2build/bin/windows/ghostscript"/>
67
68 <zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
69 </target>
70
71 <target name="compress-core-component">
72 <sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
73 </target>
74
75 <target name="prepare-sourcecode-component">
76 <mkdir dir="components/tmp/sourcecode"/>
77 <copy todir="components/tmp/sourcecode" overwrite="true">
78 <fileset dir="distribution/greenstone3">
79 <include name="src/**/*"/>
80 <include name="gs2build/common-src/**/*"/>
81 <include name="gs2build/build-src/**/*"/>
82 <include name="gs2build/runtime-src/**/*"/>
83 </fileset>
84 </copy>
85
86 <zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
87 </target>
88
89 <target name="compress-sourcecode-component">
90 <sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
91 </target>
92
93 <target name="prepare-ant-component">
94 <mkdir dir="components/tmp/ant"/>
95 <copy todir="components/tmp/ant" overwrite="true">
96 <fileset dir="distribution/greenstone3/packages">
97 <include name="ant/**/*"/>
98 </fileset>
99 </copy>
100
101 <zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
102 </target>
103
104 <target name="compress-ant-component">
105 <sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
106 </target>
107
108 <target name="prepare-tomcat-component">
109 <mkdir dir="components/tmp/tomcat"/>
110 <copy todir="components/tmp/tomcat" overwrite="true">
111 <fileset dir="distribution/greenstone3/packages">
112 <include name="tomcat/**/*"/>
113 </fileset>
114 </copy>
115
116 <zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
117 </target>
118
119 <target name="compress-tomcat-component">
120 <sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
121 </target>
122
123</project>
Note: See TracBrowser for help on using the repository browser.