File: build.xml

package info (click to toggle)
pdfsam 1.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 4,132 kB
  • ctags: 3,154
  • sloc: java: 17,003; xml: 1,332; cpp: 378; sh: 141; makefile: 20
file content (102 lines) | stat: -rw-r--r-- 3,770 bytes parent folder | download | duplicates (3)
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="pdfsam-split" default="build-jars" basedir="../">
    <description>
        Split plugin for pdfsam 
    </description>
	
  <!-- set global properties for this build -->
  	<property name="user.name" value="Andrea Vacondio"/>
  	<property name="pdfsam-split.src.dir" location="src/java"/>
  	<property name="pdfsam-split.etc.dir" location="etc"/>
	 
	  <target name="init">
	  	<property file="ant/build.properties" />
	  	  	
	  	<property name="pdfsam-split.build.root" location="${build.dir}/pdfsam-split"/>
	  	<property name="pdfsam-split.build.dir" location="${pdfsam-split.build.root}/build"/>
	  	<property name="pdfsam-split.dist.dir"  location="${pdfsam-split.build.root}/dist"/>
	  	<property name="pdfsam-split.javadoc.dir"  location="${pdfsam-split.build.root}/apidocs"/>   
	  </target>
	
	<target name="make-structure" depends="init">  	
		<!-- Create the build directory structure used by compile -->
	    <mkdir dir="${pdfsam-split.build.dir}"/>
		<mkdir dir="${pdfsam-split.dist.dir}"/>
	    <mkdir dir="${pdfsam-split.javadoc.dir}"/>
	</target>	

	  <target name="clean" depends="init" description="clean up" >
	    <!-- Delete the ${dist} directory trees -->
	    <delete dir="${pdfsam-split.javadoc.dir}"/>
	    <delete dir="${pdfsam-split.dist.dir}"/>
	    <delete dir="${pdfsam-split.build.dir}"/>
	  </target>

  <target name="compile" depends="make-structure" description="pdfsam-split " >
    <!-- Construct classpath -->
    <path id="pdfsam-split.classpath">
        <fileset dir="${libs.dir}">
          <include name="**/${log4j.jar.name}.jar"/>
          <include name="**/${dom4j.jar.name}.jar"/>
          <include name="**/${jaxen.jar.name}.jar"/>
          <include name="**/${pdfsam-console.jar.name}.jar"/>
          <include name="**/${pdfsam-langpack.jar.name}.jar"/>
        </fileset> 	
        <pathelement path="${pdfsam-split.build.dir}"/>
    	<pathelement path="${pdfsam.release.jar.dir}/${pdfsam.jar.name}.jar"/>   	
    </path>

    <!-- Compile the java code from ${src} into ${build} -->
    <javac compiler="javac1.4" target="1.4" source="1.4" srcdir="${pdfsam-split.src.dir}" destdir="${pdfsam-split.build.dir}" debug="true">
    	<classpath refid="pdfsam-split.classpath"/>
    </javac>
  </target>

  <target name="build-jars" depends="compile" description="generate the distribution" >

    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
    <jar jarfile="${pdfsam-split.dist.dir}/${pdfsam-split.jar.name}.jar" basedir="${pdfsam-split.build.dir}">
    <manifest>
		<attribute name="Built-By" value="${user.name}"/>
    </manifest>
	<fileset dir=".">
	    <include name="images/*.png"/>
	</fileset>    	  	
    </jar>
    
  </target>

  <!-- Javadoc -->
  <target name="javadoc" depends="make-structure">
    <javadoc
      packagenames="org.pdfsam.plugin.split.*"
      sourcepath="${pdfsam-split.src.dir}"
      destdir="${pdfsam-split.javadoc.dir}"
      author="true"
      version="true"
      use="true"
      windowtitle="pdfsam Split Plugin API"
      doctitle="pdfsam Split Plugin API" >
    <classpath refid="pdfsam-split.classpath"/>
    </javadoc>
  </target>


  
  <target name="buildZipSrcPackage" depends="javadoc" description="generate build sources zip package" >
    <zip destfile="${pdfsam-split.dist.dir}/${pdfsam-split.jar.name}-build-src.zip">	
		<fileset dir="..">
	    	<include name="pdfsam-split/src/java/**/*"/>
    	</fileset>
		<fileset dir="${build.dir}">
	    	<include name="pdfsam-split/apidocs/**/*.*"/>
    	</fileset>
		<fileset dir="..">
    		<include name="pdfsam-split/ant/**/*.*"/>
    		<include name="pdfsam-split/images**/*.png"/>
    	</fileset>    	
    </zip>
  </target>

</project>