blob: 666f49efe44579c9b3c11056911c1750e9dbafa1 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="jar" name="wicket-auth-roles" basedir=".">
<property name="final.name" value="wicket-auth-roles" />
<property name="src.main.dir" value="src/main/java" />
<property name="src.test.dir" value="src/test/java" />
<property name="lib.dir" value="lib" />
<property name="build.dir" value="target" />
<property name="build.main.classes" value="${build.dir}/classes" />
<property name="build.test.classes" value="${build.dir}/test-classes" />
<property name="build.test.reports" value="${build.dir}/test-reports" />
<property name="build.javadoc.dir" value="${build.dir}/docs/api" />
<path id="build.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"></include>
</fileset>
</path>
<target name="clean" description="o Cleans up the build artifacts">
<delete dir="${build.dir}" failonerror="false" />
<delete file="${final.name}.jar" failonerror="false" />
</target>
<target name="init" description="o Creates all directories for building">
<mkdir dir="${build.dir}" />
</target>
<target name="compile" depends="init" description="o Compiles the Java sources">
<mkdir dir="${build.main.classes}" />
<javac destdir="${build.main.classes}"
target="1.5"
source="1.5"
debug="true"
deprecation="true"
optimize="false"
excludes="**/package.html"
srcdir="${src.main.dir}"
classpathref="build.classpath"
/>
<copy todir="${build.main.classes}">
<fileset dir="${src.main.dir}">
<include name="**/*.*" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="test-compile" depends="compile" description="o Compiles the test sources">
<mkdir dir="${build.test.classes}" />
<javac destdir="${build.test.classes}"
source="1.5"
target="1.5"
debug="true"
deprecation="true"
optimize="false"
excludes="**/package.html"
srcdir="${src.test.dir}"
>
<classpath>
<path refid="build.classpath"></path>
<pathelement path="${build.main.classes}"></pathelement>
</classpath>
</javac>
<copy todir="${build.test.classes}">
<fileset dir="${src.test.dir}">
<include name="**/*.*" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="test" depends="test-compile" description="o Runs the unit tests">
<mkdir dir="${build.test.reports}" />
<junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
<sysproperty key="basedir" value="."></sysproperty>
<formatter type="xml" />
<formatter type="plain" usefile="false" />
<classpath>
<path refid="build.classpath"></path>
<pathelement path="${build.main.classes}" />
<pathelement path="${build.test.classes}" />
</classpath>
<batchtest todir="${build.test.reports}">
<fileset dir="${src.test.dir}">
<include name="**/*Test.java"></include>
</fileset>
</batchtest>
</junit>
</target>
<target name="javadoc" depends="init" description="o Creates the javadoc documentation">
<mkdir dir="${build.javadoc.dir}" />
<tstamp>
<format pattern="2004-yyyy" property="year"></format>
</tstamp>
<property name="copyright" value="Copyright &amp;copy; Wicket Developers. All Rights Reserved." />
<property name="title" value="Wicket API" />
<javadoc
use="true"
private="true"
destdir="${build.javadoc.dir}"
author="true"
version="true"
sourcepath="${src.main.dir}"
packagenames="wicket.*"
classpathref="build.classpath"
/>
</target>
<target name="jar" depends="test" description="o Creates a JAR file for this package">
<jar jarfile="${final.name}.jar"
excludes="**/package.html"
basedir="${build.main.classes}"/>
</target>
</project>