summaryrefslogtreecommitdiff
blob: 104cabd267a4614e7dd795c3a10be17445e1880e (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Author: Ralph Sennhauser -->
<project name="trang" default="jar" basedir=".">

  <!-- properties -->

  <property name="src.dir" value="src"/>
  <property name="build.dir" value="build"/>
  <property name="docs.dir" value="javadoc"/>
  <property name="dist.dir" value="dist"/>

  <property name="app.name" value="trang"/>
  <property name="package.names" value="com.* org.*"/>
  <property name="jar.name" value="${app.name}.jar"/>

  <!-- targets -->

  <target name="prepare">
    <mkdir dir="${build.dir}"/>
    <mkdir dir="${docs.dir}"/>
    <mkdir dir="${dist.dir}"/>
    <unzip src="${src.dir}.zip" dest="${src.dir}"/>
	<!-- need the resource files shipped inside the jar, beed! -->
    <unzip src="trang.jar" dest="${build.dir}">
	  <patternset>
	    <include name="**/*properties"/>
	  </patternset>
	</unzip>
  </target>

  <target name="compile" description="Compiles source" depends="prepare">
    <javac srcdir="${src.dir}" destdir="${build.dir}" encoding="UTF-8" classpath="${gentoo.classpath}">
<!--      <compilerarg value="-Xlint:deprecation"/> -->
<!--      <compilerarg value="-Xlint"/> -->
    </javac>
  </target>

  <target name="javadoc" depends="prepare" description="Create javadocs">
    <javadoc packagenames="net.*"
			 classpath="${gentoo.classpath}"
             sourcepath="${src.dir}"
             defaultexcludes="yes"
             destdir="./${docs.dir}"
             author="true"
             version="true"
             use="true"
             windowtitle="${app.name} API">
      <fileset dir="${src.dir}"/>
    </javadoc>
  </target>

  <target name="jar" description="Create the jar" depends="compile">
    <jar destfile="${dist.dir}/${jar.name}" basedir="${build.dir}">
      <manifest>
        <attribute name="Main-Class" value="com.thaiopensource.relaxng.translate.Driver"/>
        <attribute name="Class-Path" value="."/>
      </manifest>
	  <service type="com.thaiopensource.datatype.xsd.regex.RegexEngine">
	    <provider classname="com.thaiopensource.datatype.xsd.regex.java.RegexEngineImpl"/>
	  	<provider classname="com.thaiopensource.datatype.xsd.regex.xerces2.RegexEngineImpl"/>
	  </service>
	  <service type="org.relaxng.datatype.DatatypeLibraryFactory">
        <provider classname="com.thaiopensource.datatype.xsd.DatatypeLibraryFactoryImpl"/>
	  </service>	
    </jar>
  </target>

</project>