Permalink
Fetching contributors…
Cannot retrieve contributors at this time
264 lines (246 sloc) 9.11 KB
<project name="jwt" default="all" basedir=".">
<!-- Name of project and version -->
<property name="proj.name" value="jwt"/>
<property name="proj.version" value="3.3.10"/>
<!-- Global properties for this build -->
<property name="src.java.dir" value="src"/>
<property name="test.java.dir" value="test"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="dist"/>
<property name="archives.dir" value="archives"/>
<property name="mvn.dir" value="mvn"/>
<property name="javadoc.jwt.dir" value="doc/javadoc"/>
<property name="javadoc.jwt-auth.dir" value="doc/auth/javadoc"/>
<property name="userguide.dir" value="doc/userguide"/>
<!-- Javadoc classpath declaration -->
<path id="project.javadoc.classpath">
<fileset dir=".">
<include name="lib/javamail/*.jar"/>
<include name="lib/pdfjet/*.jar"/>
<include name="lib/gson/*.jar"/>
<include name="lib/http/*.jar"/>
<include name="lib/jpa/*.jar"/>
<include name="lib/jogl/*.jar"/>
<include name="lib/servlet-api/*.jar"/>
<include name="lib/vt-password/*.jar"/>
<include name="lib/*.jar"/>
<include name="dist/*.jar"/>
</fileset>
</path>
<target name="all" depends="dist">
</target>
<!-- Clean up -->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${archives.dir}" />
<delete dir="${mvn.dir}" />
<delete includeemptydirs="true">
<fileset dir="${javadoc.jwt.dir}" includes="**/*" excludes=".gitignore"/>
</delete>
</target>
<condition property="jdk6">
<not>
<contains string="${java.version}" substring="1.5"
casesensitive="false" />
</not>
</condition>
<target name="run">
<java jar="lib/antlr-3.5.2-complete.jar" fork="true">
<arg line="src/eu/webtoolkit/jwt/render/Css21.g"/>
</java>
</target>
<!-- Compile Java source -->
<target name="build" depends = "run">
<mkdir dir="${build.dir}"/>
<javac
srcdir="${src.java.dir}"
destdir="${build.dir}"
debug="on"
source="1.6"
target="1.6">
<src path="${src.java.dir}"/>
<src path="${test.java.dir}"/>
<classpath >
<path id="project.classpath">
<fileset dir=".">
<include name="lib/*.jar"/>
<include name="lib/javamail/*.jar"/>
<include name="lib/pdfjet/*.jar"/>
<include name="lib/gson/*.jar"/>
<include name="lib/http/*.jar"/>
<include name="lib/jpa/*.jar"/>
<include name="lib/jogl/*.jar"/>
<include name="lib/servlet-api/*.jar"/>
<include name="lib/vt-password/*.jar"/>
</fileset>
</path>
</classpath>
</javac>
<copy todir="${build.dir}/eu/webtoolkit/jwt/skeletons">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/skeletons"/>
</copy>
<copy todir="${build.dir}/resources/wt-resources">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/wt-resources"/>
</copy>
<copy todir="${build.dir}/eu/webtoolkit/jwt/wt-resources">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/wt-resources"/>
</copy>
<copy todir="${build.dir}">
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/*.xml"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/*.xml"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
<include name="eu/webtoolkit/jwt/utils/*.java"/>
</fileset>
</copy>
</target>
<target name="javadoc" depends="dist">
<javadoc
access="protected"
destdir="${javadoc.jwt.dir}"
author="true"
version="true"
use="true"
windowtitle="JWt Javadoc API"
classpathref="project.javadoc.classpath"
overview="overview.html"
additionalparam="-Xdoclint:none"
>
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<include name="eu/webtoolkit/jwt/utils/WebGraphics2D.java"/>
<exclude name="eu/webtoolkit/jwt/XSSFilter.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi25.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi3.java"/>
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
</fileset>
</javadoc>
<copy todir="${javadoc.jwt.dir}/eu/webtoolkit/jwt/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/doc-files"/>
</copy>
<copy todir="${javadoc.jwt.dir}/eu/webtoolkit/jwt/chart/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/chart/doc-files"/>
</copy>
</target>
<target name="mvn-javadoc" depends="dist">
<mkdir dir="${mvn.dir}"/>
<javadoc
access="protected"
destdir="${mvn.dir}/${javadoc.jwt.dir}"
author="true"
version="true"
use="true"
windowtitle="JWt Javadoc API"
classpathref="project.javadoc.classpath"
overview="overview.html"
>
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<include name="eu/webtoolkit/jwt/utils/WebGraphics2D.java"/>
<exclude name="eu/webtoolkit/jwt/XSSFilter.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi25.java"/>
<exclude name="eu/webtoolkit/jwt/ServletApi3.java"/>
</fileset>
</javadoc>
<copy
todir="${mvn.dir}/${javadoc.jwt.dir}/eu/webtoolkit/jwt/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/doc-files"/>
</copy>
<copy
todir="${mvn.dir}/${javadoc.jwt.dir}/eu/webtoolkit/jwt/chart/doc-files">
<fileset dir="${src.java.dir}/eu/webtoolkit/jwt/chart/doc-files"/>
</copy>
<javadoc
access="protected"
destdir="${mvn.dir}/${javadoc.jwt-auth.dir}"
author="true"
version="true"
use="true"
windowtitle="JWt Auth Javadoc API"
classpathref="project.javadoc.classpath"
overview="overview.html"
link="../jwt/"
>
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
</fileset>
</javadoc>
</target>
<target name="asciidoc">
<exec executable="asciidoc">
<arg value="-a toc" />
<arg value="-a numbered" />
<arg value="${userguide.dir}/userguide.doc" />
</exec>
</target>
<target name="dist" depends="build">
<mkdir dir="${dist.dir}"/>
<jar destfile="dist/jwt-${proj.version}.jar"
basedir="${build.dir}"
defaultexcludes="yes"
includes="eu/webtoolkit/jwt/* eu/webtoolkit/jwt/servlet/* eu/webtoolkit/jwt/chart/* eu/webtoolkit/jwt/render/* eu/webtoolkit/jwt/utils/* net/n3/nanoxml/* eu/webtoolkit/jwt/skeletons/* eu/webtoolkit/jwt/wt-resources/**/*">
<metainf dir="${build.dir}" includes="resources/wt-resources/**/*"/>
</jar>
<jar destfile="dist/jwt-auth-${proj.version}.jar"
basedir="${build.dir}"
defaultexcludes="yes"
includes="eu/webtoolkit/jwt/auth/* eu/webtoolkit/jwt/auth/jpa/*" />
</target>
<target name="mvn" depends="mvn-javadoc">
<jar jarfile="dist/jwt-${proj.version}-javadoc.jar">
<fileset dir="${mvn.dir}/${javadoc.jwt.dir}" />
</jar>
<jar jarfile="dist/jwt-auth-${proj.version}-javadoc.jar">
<fileset dir="${mvn.dir}/${javadoc.jwt-auth.dir}" />
</jar>
<jar jarfile="dist/jwt-${proj.version}-sources.jar">
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/*.java"/>
<include name="eu/webtoolkit/jwt/*.xml"/>
<include name="eu/webtoolkit/jwt/servlet/*.java"/>
<include name="eu/webtoolkit/jwt/chart/*.java"/>
<include name="eu/webtoolkit/jwt/render/*.java"/>
<include name="eu/webtoolkit/jwt/utils/*.java"/>
</fileset>
</jar>
<jar jarfile="dist/jwt-auth-${proj.version}-sources.jar">
<fileset dir="${src.java.dir}" defaultexcludes="yes">
<include name="eu/webtoolkit/jwt/auth/*.java"/>
<include name="eu/webtoolkit/jwt/auth/jpa/*.java"/>
<include name="eu/webtoolkit/jwt/auth/*.xml"/>
</fileset>
</jar>
</target>
<target name="archive" >
<delete dir="${build.dir}" />
<mkdir dir="${archives.dir}" />
<zip destfile="${archives.dir}/jwt-${proj.version}.zip">
<zipfileset
dir="."
prefix="jwt-${proj.version}/"
excludes=".git/**,.git*,${archives.dir}/**" />
</zip>
<tar destfile="${archives.dir}/jwt-${proj.version}.tar.gz" compression="gzip">
<tarfileset
dir="."
prefix="jwt-${proj.version}/"
excludes=".git/**,.git*,${archives.dir}/**" />
</tar>
</target>
<target name="release" depends="dist,javadoc,asciidoc,archive" >
</target>
</project>