File: build.xml

package info (click to toggle)
biojava3-live 3.1.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 41,268 kB
  • ctags: 25,813
  • sloc: java: 192,587; xml: 17,977; makefile: 54; sh: 46
file content (118 lines) | stat: -rw-r--r-- 4,999 bytes parent folder | download
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
<?xml  version="1.0" ?>
<project name="BJLIB" default="jar" basedir=".">
	<!-- Directory structure -->
	<property name="build.dir" location="../build/BJLIB"/>
        <property name="test.dir" location="../buildtest/BJLIB"/>
	<property name="dist.dir" location="../dist"/>
	<property name="src.dir" location="src/main/java"/>
        <property name="resources.dir" location="src/main/resources"/>
        <property name="test.src.dir" location="src/test/java"/>
        <property name="test.resources.dir" location="src/test/resources"/>
	<property name="lib.dir" location="/usr/share/java"/>
        <property name="docs.dir" location="../javadoc"/>
	<property name="docs.lib.dir" location="../doc/BJLIB"/>
	<property name="class.dir" location="${build.dir}/classes"/>
        <property name="test.class.dir" location="${test.dir}/classes"/>
	
	<property name="project.name" value="biojava"/>
	<property name="debug" value="true"/>
	<property name="optimized" value="true"/>
	<property name="project.version" value="1.8.2"/>
	<property environment="env"/>
	<property name="project.jarfile.name" value="BJLIB.jar"/>	
	
	<property name="class.path" value="${lib.dir}/commons-logging.jar ${lib.dir}/commons-cli.jar ${lib.dir}/commons-collections3.jar ${lib.dir}/commons-dbcp.jar ${lib.dir}/junit4.jar ${lib.dir}/commons-pool.jar ${lib.dir}/guava.jar ${lib.dir}/jgrapht0.8.jar ${lib.dir}/Jmol.jar /usr/share/icedtea-web/netx.jar ${lib.dir}/hamcrest.jar ${lib.dir}/json_simple.jar ${lib.dir}/commons-codec.jar ${lib.dir}/itext5.jar ${lib.dir}/Jmol.jar ${lib.dir}/log4j-1.2.jar ${lib.dir}/json-simple.jar"/>
								
	<path id="compile.classpath">
                        <fileset dir="${lib.dir}">
				<include name="commons-cli.jar"/>
				<include name="commons-collections3.jar"/>
				<include name="commons-dbcp.jar"/>
				<include name="commons-logging.jar"/>
				<include name="commons-pool.jar"/>
				<include name="commons-codec.jar"/>
				<include name="itext5.jar"/>
				<include name="Jmol.jar"/>
				<include name="junit4.jar"/>
				<include name="guava.jar"/>
				<include name="jgrapht0.8.jar"/>
				<include name="JmolApplet.jar"/>
				<include name="hamcrest.jar"/>
				<include name="json-simple.jar"/>
				<include name="log4j-1.2.jar"/>
			</fileset>
			<fileset dir="${dist.dir}">
				<include name="*.jar"/>
			</fileset>
                        <fileset dir="/usr/share/icedtea-web">
                                <include name="netx.jar"/>
                        </fileset>
	</path>
	
	
	<target name="clean">
		<echo level="info">Cleaning build directories</echo>
		<delete verbose="true" includeEmptyDirs="true">
			<fileset dir="${build.dir}" includes="**"/>
			<fileset dir="${dist.dir}" includes="${project.name}*.jar"/>
		</delete>
	</target>
	
	<target name="javadocs">
                <mkdir dir="${docs.dir}"/>
		<mkdir dir="${docs.lib.dir}"/>
		<javadoc destdir="${docs.lib.dir}" sourcepath="${src.dir}" packagenames="org.*" encoding="UTF-8">
			<link href="http://java.sun.com/j2se/1.6.0/docs/api/"/>
		</javadoc>
	</target>
	
	<target name="compile">
		<mkdir dir="${class.dir}"/>
		<mkdir dir="${dist.dir}"/>
		<javac srcdir="${src.dir}" destdir="${class.dir}" classpathref="compile.classpath" debug="${debug}" optimize="${optimized}" nowarn="true" source="1.6" target="1.6">
		</javac>
                <copy todir="${class.dir}" failonerror="false">
                  <fileset dir="${resources.dir}"/>
                </copy>
	</target>

        <target name="compile-test">
                <mkdir dir="${test.class.dir}"/>
                <javac srcdir="${test.src.dir}" destdir="${test.class.dir}" classpathref="compile.classpath" debug="${debug}" optimize="${optimized}" nowarn="true">
                </javac>
                <copy todir="${test.class.dir}" failonerror="false">
                  <fileset dir="${test.resources.dir}"/>
                </copy>
                <copy todir="${test.class.dir}" failonerror="false">
                  <fileset dir="${src.dir}"/>
                </copy>
        </target>

  <path id="test.classpath">
     <path refid="compile.classpath"/>
     <pathelement location="${test.class.dir}" />
  </path>

  <target name="test" depends="compile-test">
    <junit haltonfailure="yes" printsummary="yes" fork="true">
      <classpath refid="test.classpath"/>
      <formatter type="plain" usefile="false" />
      <batchtest>
        <fileset dir="${test.class.dir}" includes="**/*Test.class" excludes="**/Abstract*.class" />
      </batchtest>
    </junit>
  </target>
	
	<target name="jar" depends="compile">
		<jar destfile="${dist.dir}/${project.jarfile.name}"  basedir="${class.dir}" >
		 <manifest>
		    <attribute name="Built-By" value="Debian-Med team"/>
	            <attribute name="Class-Path" value="${class.path}"/>
		      <attribute name="Specification-Title" value="BioJava"/>
		      <attribute name="Specification-Version" value="${project.version}"/>
		  </manifest>
		</jar>
	</target>
	
</project>