File: build.xml

package info (click to toggle)
zemberek-server 0.7.1-12.2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 248 kB
  • ctags: 132
  • sloc: java: 562; sh: 202; xml: 140; makefile: 17
file content (168 lines) | stat: -rw-r--r-- 6,255 bytes parent folder | download | duplicates (6)
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!--
~  ***** BEGIN LICENSE BLOCK *****
~
~  Version: MPL 1.1
~
~  The contents of this file are subject to the Mozilla Public License Version
~  1.1 (the "License"); you may not use this file except in compliance with
~  the License. You may obtain a copy of the License at
~  http://www.mozilla.org/MPL/
~
~  Software distributed under the License is distributed on an "AS IS" basis,
~  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
~  for the specific language governing rights and limitations under the
~  License.
~
~  The Original Code is "Zemberek Dogal Dil Isleme Kutuphanesi".
~
~  The Initial Developer of the Original Code is
~  Mehmet D. Akin.
~  Portions created by the Initial Developer are Copyright (C) 2006
~  the Initial Developer. All Rights Reserved.
~
~  Contributor(s):
~   Serkan Kaba
~
~  ***** END LICENSE BLOCK *****
-->

<project name="zemberek-server" default="dist">

    <!-- read the parameters from build.properties file.-->
    <property file="build.properties"/>

    <!-- source files. java, test, configuration files. -->
    <property name="src.java" location="src"/>
    <property name="src.test" location="test"/>
    <property name="src.config" location="config"/>

    <!-- after compilation, where will we put the class files?. -->
    <property name="build.dir" location="build"/>
    <property name="build.java" location="build/java"/>
    <property name="build.test" location="build/test"/>
    <property name="test.results" location="build/test-results"/>
    <!--distribution -->
    <property name="dist.dir" location="dist"/>
    <property name="lib.runtime" location="lib"/>
    <property name="licences.dir" location="lisanslar"/>

    <!--    show the library files for classpath information and a complete build(tests etc).-->
    <path id="classpath.build">
        <fileset dir="lib"/>
    </path>

    <!--    library files for runtime only.-->
    <path id="classpath.runtime">
        <fileset dir="lib"/>
    </path>

    <!--    Compiles the java files. and results will be copied to build directory-->
    <target name="java" description="Compile Java">
        <mkdir dir="${build.java}"/>
        <javac srcdir="${src.java}"
            destdir="${build.java}"
            classpathref="classpath.build" encoding="utf-8"/>
        <copy todir="${build.java}">
            <fileset dir="${src.java}">
                <exclude name="**/*.java"/>
            </fileset>
        </copy>

        <mkdir dir="${build.test}"/>
        <javac srcdir="${src.test}"
            destdir="${build.test}"
            debug="true" encoding="utf-8">
            <classpath>
                <path refid="classpath.build"/>
                <pathelement path="${build.java}"/>
            </classpath>
        </javac>
        <copy todir="${build.test}">
            <fileset dir="${src.test}">
                <exclude name="**/*.java"/>
            </fileset>
        </copy>
    </target>

    <!--    copies the configuration files to the buid directory
    <target name="config" description="Generate and assemble configuration">
        <copy todir="${build.kaynaklar}/config">
            <fileset dir="${src.config}"/>
        </copy>
        <copy todir="${build.kaynaklar}">
            <fileset dir="${src.kaynaklar}"/>
        </copy>
    </target>
    -->

    <!--    Cleans the compiled files.-->
    <target name="clean" description="Clean up built files">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
        <echo message="All clean"/>
    </target>

    <target name="dist" depends="clean,java"
        description="Generates distribution files">
        <delete dir="${dist.dir}"/>
        <mkdir dir="${dist.dir}"/>
        <mkdir dir="${dist.dir}/lib"/>
        <mkdir dir="${dist.dir}/config"/>
         
        <copy todir="${dist.dir}/lib">
            <fileset dir="${lib.runtime}">
            </fileset>
        </copy>

    	<copy todir="${dist.dir}/config">
            <fileset dir="${src.config}">
            </fileset>
        </copy>
    	
        <copy todir="${dist.dir}/lisanslar">
            <fileset dir="${licences.dir}">
            </fileset>
        </copy>
    	
    	<copy file="run.sh" todir="${dist.dir}" />
    	<copy file="runtest_dbus.sh" todir="${dist.dir}" /> 
    	<copy file="runtest_socket.sh" todir="${dist.dir}" />
    	<copy file="zemberek-server.xml" todir="${dist.dir}" />
        <tstamp>
            <format property="release" pattern="-dMMMyy" locale="tr"/>
        </tstamp>
        <jar jarfile="${dist.dir}/${isim}-${surum}.jar" basedir="${build.java}">
            <!-- executable jar icin gerekli class va paket bilgileri-->
            <manifest>
                <attribute name="Built-By" value="zemberek team"/>
                <attribute name="Main-Class"
                    value="net.zemberekserver.server.ZemberekServer"/>
                <attribute name="Class-Path"
                    value=". lib/mina-core-1.1.0.jar lib/slf4j-nop.jar lib/zemberek-cekirdek-2.1.jar lib/zemberek-tr-2.1.jar lib/dbus.jar lib/unix.jar lib/hexdump.jar"/>
            </manifest>
        </jar>
        <!-- create the zip file with the same naming scheme -->
        <zip destfile="${dist.dir}/${isim}-${surum}.zip"
            basedir="${dist.dir}"
            update="true"
            excludes="**/*.zip"
            />
    	<tar destfile="${dist.dir}/${isim}-${surum}.tar.gz" basedir="." compression="gzip">
    		<exclude name="**/.*/**"/>
    		<exclude name="**/dist/**"/>
    		<exclude name="**/build/**"/>
    		<exclude name="**/bin/**"/>
    	</tar>
    	<tar destfile="${dist.dir}/${isim}-nolibs-${surum}.tar.gz" basedir="." compression="gzip">
    	    <exclude name="**/.*/**"/>
    	    <exclude name="**/dist/**"/>
    	    <exclude name="**/build/**"/>
    		<exclude name="**/bin/**"/>
    		<exclude name="**/lib/**"/>
    	</tar>
    	<echo level="warning">UYARI!</echo>
    	<echo level="warning">Derlenmiş JNI kütüphanesi (libunix-java.so) ile ilgili sorun yaşarsanız lütfen bildiriniz.</echo>
    	<echo level="warning">Kütüphaneyi kaynağını http://www.matthew.ath.cx/projects/java/ adresinden indirerek derleyebilirsiniz.</echo>
    </target>

</project>