File: build.xml

package info (click to toggle)
king 2.21.120420+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 45,228 kB
  • ctags: 10,805
  • sloc: java: 80,893; xml: 579; cpp: 209; makefile: 29; sh: 14
file content (151 lines) | stat: -rw-r--r-- 6,748 bytes parent folder | download | duplicates (4)
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
<!-- (jEdit options) :folding=explicit:collapseFolds=1: -->
<project name="chiropraxis" default="dist" basedir=".">
<description>Chiropraxis - manipulations for models of protein backbone</description>

<!-- global properties that we always want defined {{{ -->
<property name="src"        location="src"/>
<property name="resource"   location="resource"/>
<property name="build"      location="build"/>
<property name="dist"       location="dist"/>
<!-- Version control: creates timestamp, updates ${buildnum}, loads ${version} -->
<target name="init">
    <tstamp>
        <format property="DSTAMP_SIX" pattern="yyMMdd"/>
    </tstamp>
    <propertyfile file="${resource}/${ant.project.name}/buildnum.props">
        <entry key="buildnum" value="${DSTAMP}.${TSTAMP}"/>
    </propertyfile>
    <property file="${resource}/${ant.project.name}/buildnum.props"/>
    <property file="${resource}/${ant.project.name}/version.props"/>
</target>
<!-- Defines properties needed to use SCP -->
<target name="init-scp">
    <property file="../lib/scp.props"/>
</target>
<!-- }}} -->

<!-- build, compile {{{ -->
<!-- Bundles up all needed class and resource files into a JAR -->
<target name="build" description="Build class files" depends="init,compile">
    <echo message="Version ${version}"/>
    <echo message="Build # ${buildnum}"/>
    <jar jarfile="${ant.project.name}.jar" manifest="Manifest.mf" index="false">
        <fileset dir="${build}"/>
        <fileset dir="${resource}"/>
        <fileset dir="../driftwood/build/"/>
        <fileset dir="../driftwood/resource/"/>
        <fileset dir="../molikin/build/"/>
    </jar>
</target>

<!-- Compiles all .java files for this package -->
<target name="compile" depends="init">
    <ant antfile="../driftwood/build.xml" inheritAll="false" target="compile">
        <!-- inherited properties go here -->
    </ant>
    <ant antfile="../king/build.xml" inheritAll="false" target="compile">
        <!-- inherited properties go here -->
    </ant>
    <ant antfile="../molikin/build.xml" inheritAll="false" target="compile">
        <!-- inherited properties go here -->
    </ant>
    <copy file="/usr/share/java/itext.jar" tofile="${basedir}/itext.jar" failonerror="false"/>
    <mkdir dir="${build}"/>
    <javac srcdir="${src}"
           destdir="${build}"
           includes="**/*.java"
           excludes="**/old/"
           debug="on" debuglevel="lines,source"
           target="1.5" source="1.5">
           <!-- <compilerarg value="-Xlint"/> -->
         <classpath>
            <pathelement location="../driftwood/build"/>
            <pathelement location="../king/build"/>
            <pathelement location="itext.jar"/>             <!-- Required for PDF export -->
            <pathelement location="../molikin/build"/>
         </classpath>
    </javac>
</target>
<!-- }}} -->

<!-- dist, dist-src, dist-exe {{{ -->
<!-- Makes .zip and .tgz files from the ${dist} directory -->
<target name="dist" description="Generate the distributions" depends="init,clean,build,dist-src,dist-exe">
    <zip destfile="${dist}/${ant.project.name}-${version}-src.zip">
         <zipfileset dir="${dist}" includes="${ant.project.name}/"/>
         <zipfileset dir="../driftwood/dist/" includes="driftwood/"/>
    </zip>
    <zip basedir="${dist}"
         destfile="${dist}/${ant.project.name}-${version}.zip"
         includes="${ant.project.name}-${version}/"/>
</target>

<!-- Makes the source code distribution -->
<target name="dist-src" depends="init">
    <ant antfile="../driftwood/build.xml" inheritAll="false" target="dist-src">
        <!-- inherited properties go here -->
    </ant>
    <!--<mkdir dir="${dist}/${ant.project.name}-${version}-src"/>
    <copy todir="${dist}/${ant.project.name}-${version}-src" preservelastmodified="true">-->
    <mkdir dir="${dist}/${ant.project.name}"/>
    <copy todir="${dist}/${ant.project.name}" preservelastmodified="true">
        <fileset dir="${basedir}">
            <exclude name="build/"/>
            <exclude name="dist/"/>
            <exclude name="**/old/"/>
        </fileset>
    </copy>
</target>

<!-- Makes the end-user distribution -->
<target name="dist-exe" depends="init,build">
    <mkdir dir="${dist}/${ant.project.name}-${version}"/>
    <copy todir="${dist}/${ant.project.name}-${version}" preservelastmodified="true">
        <fileset dir="${basedir}">
            <include name="${ant.project.name}.jar"/>
            <include name="README*"/>
            <include name="LICENSE*"/>
            <include name="doc/"/>
            <exclude name="doc/work/"/>
        </fileset>
    </copy>
</target>
<!-- }}} -->

<!-- clean, backup {{{ -->
<!-- Removes products of compilation -->
<target name="clean" description="Clean up build/ and dist/">
    <delete dir="${dist}"/>
    <delete dir="${build}"/>
    <delete file="${ant.project.name}.jar"/>
    <delete file="itext.jar"/>
</target>

<!-- Bundles this code and saves it locally and remotely - simple version control -->
<target name="backup" depends="init,clean,init-scp" description="Backs up this project on IWD's machine">
    <tstamp/>
    <mkdir dir="${user.home}/ark/old-versions/${ant.project.name}"/>
    <jar jarfile="${user.home}/ark/old-versions/${ant.project.name}/${ant.project.name}-${version}.${buildnum}.jar" index="true">
        <fileset dir="${basedir}"/>
    </jar>
    <scp file="${user.home}/ark/old-versions/${ant.project.name}/${ant.project.name}-${version}.${buildnum}.jar"
        todir="${scp.backup.username}@${scp.backup.hostname}:${scp.backup.path}/${ant.project.name}-${version}.${buildnum}.jar"
        password="${scp.backup.password}" failonerror="true"/>
</target>
<!-- }}} -->

<!-- deploy-local, deploy-local-mp {{{ -->
<!-- Deploys the executable on the local system - applies to IWD's machine only -->
<target name="deploy-local"  description="Build class files and copy to plugins/" depends="build">
    <copy file="${ant.project.name}.jar" todir="../king/plugins/" overwrite="true" failonerror="true"/>
    <copy file="${ant.project.name}.jar" todir="${user.home}/bin/jars/plugins/" overwrite="true" failonerror="false"/>
    <copy file="${ant.project.name}.jar" todir="/Applications/KiNG.app/Contents/Resources/Java/plugins/" overwrite="true" failonerror="false"/>
</target>

<!-- Deploys the executable on the local MolProbity - applies to IWD's machine only  -->
<target name="deploy-local-mp"  description="Deploy to local MolProbity" depends="build">
    <copy file="${ant.project.name}.jar" todir="${user.home}/Sites/molprobity3/lib/" overwrite="true" failonerror="false"/>
    <copy file="itext.jar" todir="${user.home}/Sites/molprobity3/lib/" overwrite="true" failonerror="false"/>
</target>
<!-- }}} -->
</project>