moved files to maven standard directory layout
git-svn-id: https://svn.apache.org/repos/asf/incubator/jsecurity/trunk@757902 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build.xml b/build.xml
deleted file mode 100644
index 6f05c31..0000000
--- a/build.xml
+++ /dev/null
@@ -1,594 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ 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.
- -->
-
-<!-- Apache Ki root build file. If you want to understand how the Apache Ki build environment
- works (useful if you want to build from scratch or join the project as a developer),
- Read this article:
-
- An Ant Modular Build Environment for Enterprise Applications:
- http://www.onjava.com/pub/a/onjava/2005/06/22/modularant.html
-
- Reading this will instantly make you familiar with our build.
--->
-<project name="ki" default="all" xmlns:ivy="antlib:org.apache.ivy.ant">
-
- <import file="./common.ant.xml"/>
-
- <property name="ivy.install.version" value="2.0.0"/>
- <condition property="ivy.home" value="${env.IVY_HOME}">
- <isset property="env.IVY_HOME"/>
- </condition>
- <property name="ivy.home" value="${user.home}/.ant"/>
- <property name="ivy.jar.dir" value="${ivy.home}/lib"/>
- <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
-
- <property name="src.ref.dir" value="${root.base.dir}/docs/reference"/>
- <property name="dist.ref.dir" value="${docs.dir}/reference"/>
- <!-- default to single sided: -->
- <property name="double.sided" value="0"/>
-
- <path id="javadoc.src">
- <pathelement location="${root.base.dir}/core/src"/>
- <pathelement location="${root.base.dir}/web/src"/>
- <pathelement location="${root.base.dir}/support/ehcache/src"/>
- <pathelement location="${root.base.dir}/support/quartz/src"/>
- <pathelement location="${root.base.dir}/support/spring/src"/>
- </path>
-
- <path id="all.src">
- <path refid="javadoc.src"/>
- <pathelement location="${root.base.dir}/samples/spring/src"/>
- <pathelement location="${root.base.dir}/samples/spring-hibernate/src"/>
- </path>
-
- <property name="ivy.repository.url" value="http://repo1.maven.org/maven2"/>
- <!-- To disable this task (maybe behind a firewall?), use the -Doffline=true command-line switch -->
- <target name="download-ivy" unless="offline" description="Ensures Ivy exists for automatic dependency mgt">
- <mkdir dir="${ivy.jar.dir}"/>
- <!-- download Ivy from web site so that it can be used even without any special installation -->
- <echo message="Installing Ivy for automated dependecy management..."/>
- <get src="${ivy.repository.url}/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
- dest="${ivy.jar.file}" usetimestamp="true"/>
- </target>
-
- <!-- =================================
- target: load-ivy
- This target is not necessary if you put ivy.jar in your ant lib directory.
- If you already have ivy in your ant lib, you can simply remove this target.
- ================================= -->
- <target name="load-ivy" depends="download-ivy" description="Ensures Ivy ant tasks are loaded">
- <!-- try to load ivy here from local ivy dir, in case the user has not already dropped
- it into ant's lib dir (note that the latter copy will always take precedence).
- We will not fail as long as local lib dir exists (it may be empty) and
- ivy is in at least one of ant's lib dir or the local lib dir. -->
- <path id="ivy.lib.path">
- <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
- </path>
- <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
- </target>
-
- <target name="retrieve-dependencies" depends="load-ivy"
- description="Ensures all build dependencies have been downloaded">
- <mkdir dir="${lib.dir}"/>
- <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]" sync="true"/>
- </target>
-
- <target name="init">
- <mkdir dir="${dist.dir}/modules"/>
- <mkdir dir="${dist.dir}/samples"/>
- </target>
-
- <!-- ==================================================================
- Template target. Never called explicitly, only used to pass target
- calls to the underlying modules.
- ================================================================== -->
- <target name="template">
- <!-- This section defines the modules and the order in which they are
- executed for any given target. This means ORDER MATTERS.
- Any dependencies that are to be satisified by one module for
- another must be declared in the order the dependencies occur. -->
- <echo message="Executing '${target}' for the core module..."/>
- <ant dir="core" target="${target}"/>
- <echo message="Executing '${target}' for the web module..."/>
- <ant dir="web" target="${target}"/>
- <echo message="Executing '${target}' for the ehcache module..."/>
- <ant dir="support/ehcache" target="${target}"/>
- <echo message="Executing '${target}' for the spring module..."/>
- <ant dir="support/spring" target="${target}"/>
- <echo message="Executing '${target}' for the quartz module..."/>
- <ant dir="support/quartz" target="${target}"/>
- <echo message="Executing '${target}' for the samples/quickstart module..."/>
- <ant dir="samples/quickstart" target="${target}"/>
- <echo message="Executing '${target}' for the samples/standalone module..."/>
- <ant dir="samples/standalone" target="${target}"/>
- <echo message="Executing '${target}' for the samples/spring module..."/>
- <ant dir="samples/spring" target="${target}"/>
- <echo message="Executing '${target}' for the samples/spring-hibernate module..."/>
- <ant dir="samples/spring-hibernate" target="${target}"/>
- <echo message="Executing '${target}' for the samples/web module..."/>
- <ant dir="samples/web" target="${target}"/>
-
- </target>
-
- <!-- ===================================================================
- Clean all local and children build files
- =================================================================== -->
- <target name="clean" description="Cleans the entire project">
- <echo message="Cleaning all modules..."/>
- <antcall target="template">
- <param name="target" value="clean"/>
- </antcall>
- <echo message="Cleaning root build directory."/>
- <delete dir="${build.dir}"/>
- </target>
-
- <target name="compile" depends="retrieve-dependencies,init" description="Compiles the project">
- <echo message="Compiling all modules..."/>
- <antcall target="template">
- <param name="target" value="compile"/>
- </antcall>
- </target>
-
- <macrodef name="jarjar">
- <attribute name="srcdir" default="${dist.dir}/modules"/>
- <attribute name="todir" default="${dist.dir}"/>
- <attribute name="jdksuffix" default=""/>
- <sequential>
- <jar destfile="@{todir}/${project.name}@{jdksuffix}-${version}.jar" duplicate="fail">
- <zipfileset src="@{srcdir}/${project.name}-core@{jdksuffix}-${version}.jar"/>
- <zipfileset src="@{srcdir}/${project.name}-web@{jdksuffix}-${version}.jar"/>
- <zipfileset src="@{srcdir}/${project.name}-ehcache@{jdksuffix}-${version}.jar"/>
- <zipfileset src="@{srcdir}/${project.name}-quartz@{jdksuffix}-${version}.jar"/>
- <zipfileset src="@{srcdir}/${project.name}-spring@{jdksuffix}-${version}.jar"/>
- </jar>
- </sequential>
- </macrodef>
-
- <target name="package" depends="retrieve-dependencies,init" description="Creates project artifacts">
- <echo message="Packaging all modules..."/>
- <antcall target="template">
- <param name="target" value="package"/>
- </antcall>
-
- <!-- Now that each module has been packaged, make a 'master' .jar that includes everything. This allows
- end-users to choose to use a single jar or multiple jars depending on their preference: -->
- <jarjar/>
- <jarjar srcdir="${dist.dir}/jdk14" todir="${dist.dir}/jdk14" jdksuffix="-jdk14"/>
- <jarjar srcdir="${dist.dir}/jdk13" todir="${dist.dir}/jdk13" jdksuffix="-jdk13"/>
-
- </target>
-
- <target name="samples.web.deploy" depends="package"
- description="Deploys the Apache Ki quickstart .war">
- <ant dir="samples/web" target="deploy"/>
- </target>
-
- <target name="samples.spring.deploy" depends="package"
- description="Deploys the sample Apache Ki/Spring .war">
- <ant dir="samples/spring" target="deploy"/>
- </target>
-
- <target name="samples.spring-hibernate.deploy" depends="package"
- description="Deploys the sample Apache Ki Spring/Hibernate .war">
- <ant dir="samples/spring-hibernate" target="deploy"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Javadoc all main sources -->
- <!-- =================================================================== -->
- <target name="javadoc" description="Generate Javadocs">
-
- <echo message="Generating JavaDoc API..."/>
- <delete dir="${api.dir}" failonerror="false"/>
- <mkdir dir="${api.dir}"/>
-
- <javadoc destdir="${api.dir}" windowtitle="Apache Ki API ${version}"
- source="1.5" access="package" author="true" version="true" use="true"
- defaultexcludes="true"
- header='<a href=\"http://ki.apache.org/\" target=\"_top\">Apache Ki</a>'>
- <sourcepath refid="javadoc.src"/>
- <arg value="-breakiterator"/>
- <arg value="-J-Xmx128m"/>
- <arg value="-J-XX:MaxPermSize=128m"/>
- <!-- <arg value="-J-Dhttp.proxyHost=${javadoc.proxyhost}"/>
- <arg value="-J-Dhttp.proxyPort=${javadoc.proxyport}"/> -->
- <doctitle><![CDATA[<h1>Apache Ki API ${version}</h1>]]></doctitle>
- <!-- The following <bottom> block is to enable UA tracking via Google Analytics, but it fails the
- JavaDoc task on a Windows Sun JDK. It works fine on Mac OS X JavaDoc. Since we want this UA
- tracking, we use a Mac to build the release that end-users will download, so we leave this block
- enabled. If you want to run JavaDoc in a Windows environment, remove this block, and it will
- run successfully. -->
- <bottom>
- <![CDATA[
- <i>Copyright © 2004-2008 <a href="http://ki.apache.org/" target="_top">Apache Ki</a>.</i>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src=%22" + gaJsHost + "google-analytics.com/ga.js%22 type=%22text/javascript%22%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-3614410-1");
- pageTracker._initData();
- pageTracker._trackPageview();
- </script>
- ]]>
- </bottom>
- <classpath refid="all.libs"/>
- <!-- <packageset dir="${base.dir}/core/src">
- <include name="org/apache/ki/**"/>
- </packageset>
- <packageset dir="${root.base.dir}/support/ehcache/src">
- <include name="org/apache/ki/**"/>
- </packageset>
- <packageset dir="${root.base.dir}/support/spring/src">
- <include name="org/apache/ki/**"/>
- </packageset>
- <packageset dir="${root.base.dir}/support/quartz/src">
- <include name="org/apache/ki/**"/>
- </packageset> -->
- <link href="http://java.sun.com/j2se/1.5/docs/api"/>
- <link href="http://java.sun.com/j2ee/1.4/docs/api"/>
- <!-- Jakarta Commons -->
- <link href="http://jakarta.apache.org/commons/collections/apidocs/"/>
- <link href="http://commons.apache.org/beanutils/commons-beanutils-1.7.0/docs/api/"/>
- <link href="http://jakarta.apache.org/commons/logging/apidocs/"/>
- <link href="http://jakarta.apache.org/commons/codec/apidocs/"/>
- <link href="http://quartz.sourceforge.net/javadoc/"/>
- <link href="http://static.springframework.org/spring/docs/2.5.x/api/"/>
- <link href="http://ehcache.sourceforge.net/javadoc/"/>
- </javadoc>
-
- </target>
-
- <!-- ===================================================================
- - Reference documentation
- - =================================================================== -->
- <target name="doc.prepare" depends="retrieve-dependencies" description="Extra preparation for the documentation">
-
- <!-- unzip the docbook-libs.zip file containing the necessary jars: -->
- <unzip src="${lib.dir}/docbook/docbook-libs-1.0.0.zip" dest="${lib.dir}/docbook"/>
-
- <!-- <antcall target="tld.to.docbook"/> -->
-
- </target>
-
-
- <target name="doc.pdf" depends="doc.prepare" description="Compile reference documentation to pdf">
-
- <mkdir dir="${dist.ref.dir}/pdf/images"/>
-
- <copy todir="${dist.ref.dir}/pdf/images">
- <fileset dir="${src.ref.dir}/images">
- <include name="**/*"/>
- </fileset>
- </copy>
-
- <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${dist.ref.dir}">
- <classpath>
- <fileset dir="${lib.dir}/docbook">
- <include name="**/*.jar"/>
- </fileset>
- </classpath>
- <jvmarg value="-Xmx256M"/>
- <jvmarg value="-XX:MaxPermSize=128m"/>
- <arg value="-o"/>
- <arg value="${dist.ref.dir}/pdf/docbook_fop.tmp"/>
- <arg value="${src.ref.dir}/src/index.xml"/>
- <arg value="${src.ref.dir}/styles/fopdf.xsl"/>
- <!-- controls the double sided pagination style -->
- <arg value="double.sided=${double.sided}"/>
- </java>
-
- <java classname="org.apache.fop.apps.Fop" fork="true" maxmemory="256m" dir="${dist.ref.dir}">
- <classpath>
- <fileset dir="${lib.dir}/docbook">
- <include name="**/*.jar"/>
- </fileset>
- </classpath>
- <arg value="${dist.ref.dir}/pdf/docbook_fop.tmp"/>
- <arg value="${dist.ref.dir}/pdf/ki-reference.pdf"/>
- </java>
-
- <delete file="${dist.ref.dir}/pdf/docbook_fop.tmp"/>
-
- </target>
-
-
- <!-- Start of TLD => DocBook targets -->
- <!-- <target name="tld.to.docbook" depends="original.tld.to.docbook,forms.tld.to.docbook"/>
-
-
-<target name="original.tld.to.docbook">
-
-<antcall target="hack.DOCTYPE">
-<param name="doctype.input.file" value="src/org/springframework/web/servlet/tags/spring.tld"/>
-<param name="doctype.scrubbed.file" value="${doc.ref.dir}/src/spring.tld"/>
-</antcall>
-
-<antcall target="private.tld.to.docbook">
-<param name="input.tld" value="spring.tld"/>
-<param name="input.tld.file" value="${doc.ref.dir}/src/spring.tld"/>
-</antcall>
-
-</target>
-
-
-<target name="forms.tld.to.docbook">
-
-<antcall target="hack.DOCTYPE">
-<param name="doctype.input.file" value="src/org/springframework/web/servlet/tags/form/spring-form.tld"/>
-<param name="doctype.scrubbed.file" value="${doc.ref.dir}/src/spring-form.tld"/>
-</antcall>
-
-<antcall target="private.tld.to.docbook">
-<param name="input.tld" value="spring-form.tld"/>
-<param name="input.tld.file" value="${doc.ref.dir}/src/spring-form.tld"/>
-</antcall>
-
-</target>
-
-
-<target name="private.tld.to.docbook" if="input.tld">
-
-<property name="out.file" value="${doc.ref.dir}/src/${input.tld}.xml"/>
-
-<xslt processor="trax" in="${input.tld.file}" out="${out.file}"
- style="${doc.ref.dir}/styles/tld.to.docbook.xsl">
-<param name="title" expression="${input.tld}"/>
-</xslt>
-
-<antcall target="hack.CDATA">
-<param name="target.file" value="${out.file}"/>
-</antcall>
-
-<delete file="${input.tld.file}"/>
-
-</target>
-
-
-<target name="hack.CDATA" if="target.file">
-
-<replace file="${target.file}">
-<replacetoken><![CDATA[<]]></replacetoken>
-<replacevalue><![CDATA[<]]></replacevalue>
-</replace>
-
-<replace file="${target.file}">
-<replacetoken><![CDATA[>]]></replacetoken>
-<replacevalue><![CDATA[>]]></replacevalue>
-</replace>
-
-</target>
-
-
-<target name="hack.DOCTYPE" if="doctype.input.file">
-
-<!- -
-Removes the TLD DTD decl. from the TLD files as this messes
-up the transform (feel free to fix this more elegantly)
-- ->
-<copy file="${doctype.input.file}" tofile="${doctype.scrubbed.file}" overwrite="true"/>
-
-<replace file="${doctype.scrubbed.file}" value="">
-<replacetoken><![CDATA[<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">]]></replacetoken>
-</replace>
-
-</target>
-<!- - End of TLD => DocBook targets -->
-
-
- <target name="doc.html" depends="doc.prepare"
- description="Compile reference documentation to chunked html">
-
- <mkdir dir="${dist.ref.dir}/html/images"/>
-
- <copy todir="${dist.ref.dir}/html/images">
- <fileset dir="${src.ref.dir}/images">
- <include name="**/*"/>
- </fileset>
- </copy>
-
- <copy todir="${dist.ref.dir}/html/" failonerror="false">
- <fileset dir="${src.ref.dir}/styles/">
- <include name="*.css"/>
- <include name="*.js"/>
- </fileset>
- </copy>
-
- <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${dist.ref.dir}/html/">
- <classpath>
- <fileset dir="${lib.dir}/docbook">
- <include name="**/*.jar"/>
- </fileset>
- </classpath>
- <jvmarg value="-Xmx256M"/>
- <jvmarg value="-XX:MaxPermSize=128m"/>
- <arg value="${src.ref.dir}/src/index.xml"/>
- <arg value="${src.ref.dir}/styles/html_chunk.xsl"/>
- </java>
-
- </target>
-
-
- <target name="doc.htmlsingle" depends="doc.prepare" description="Compile reference documentation to single html">
-
- <mkdir dir="${dist.ref.dir}/html_single/images"/>
-
- <copy todir="${dist.ref.dir}/html_single/images">
- <fileset dir="${src.ref.dir}/images">
- <include name="**/*"/>
- </fileset>
- </copy>
- <copy todir="${dist.ref.dir}/html_single/" file="${src.ref.dir}/styles/html.css" failonerror="false"/>
-
- <java classname="com.icl.saxon.StyleSheet" fork="true" dir="${dist.ref.dir}">
- <classpath>
- <fileset dir="${lib.dir}/docbook">
- <include name="**/*.jar"/>
- </fileset>
- </classpath>
- <jvmarg value="-Xmx256M"/>
- <jvmarg value="-XX:MaxPermSize=128m"/>
- <arg value="-o"/>
- <arg value="${dist.ref.dir}/html_single/index.html"/>
- <arg value="${src.ref.dir}/src/index.xml"/>
- <arg value="${src.ref.dir}/styles/html.xsl"/>
- </java>
-
- </target>
-
-
- <target name="doc.all" depends="doc.html,doc.htmlsingle,doc.pdf" description="Generate reference documentation"/>
-
- <!-- <name name="junit.check.warning" if="tests.failed">
- <echo>
- ***********************************************************
- * One or more unit tests failed!
- * Check the reports located in ${test.docs.dir}
- * for details...
- ***********************************************************
- </echo>
- </name>
-
- <!- - ===================================================================
- - quick-test-report - quickly generates test report documentation based
- - on the xml test reports previously created during a junit task
- - execution. (this does not run the task).
- - =================================================================== - ->
- <name name="test.report">
- <echo message="Generating test reports..."/>
-
- <junitreport todir="${test.docs.dir}">
- <fileset dir=".">
- <include name="**/TEST-*"/>
- </fileset>
- <report todir="${test.docs.dir}"/>
- </junitreport>
- </name>
-
- <name name="unit.tests" depends="compile">
- <echo message="Executing unit tests..."/>
-
- <!- - Any properties files needed by test cases and/or Spring test case
- configuration must be under the base root dir hierarchy so relative
- file references may work properly. - ->
- <copy toDir="${classes.dir}" preservelastmodified="true" file="${root.base.dir}/etc/log4j.properties"/>
- <copy toDir="${classes.dir}" preservelastmodified="true" file="${root.base.dir}/db/build/gen/jdbc.properties"/>
-
- <junit printsummary="withOutAndErr"
- showoutput="true"
- haltonfailure="no"
- failureproperty="tests.failed"
- errorproperty="tests.failed"
- timeout="60000"
- fork="yes">
- <classpath refid="test.path"/>
-
- <formatter type="brief" usefile="false"/>
- <formatter type="xml"/>
- <!- - allows us to generate web reports - ->
-
- <batchtest fork="true" todir="${gen.dir}">
- <fileset dir="${test.classes.dir}">
-
- <include name="**/*Test.class"/>
-
- <exclude name="**/*IntegrationTest.class"/>
- <exclude name="**/*SystemTest.class"/>
- <exclude name="**/*StressTest.class"/>
-
- </fileset>
- </batchtest>
-
- </junit>
-
- </name>
-
- <name name="test" depends="dist">
- <antcall name="template">
- <param name="name" value="test"/>
- </antcall>
- </name> -->
-
-
- <target name="src.zip" description="Create source ZIP (containing Java sources)">
- <mkdir dir="${root.dist.dir}"/>
- <delete file="${root.dist.dir}/${project.name}.src.zip"/>
- <zip destfile="${root.dist.dir}/${project.name}.src.zip">
- <path refid="all.src"/>
- </zip>
- </target>
-
- <target name="makepom" depends="load-ivy" description="Use Ivy to generate a Maven 2 pom.xml file">
- <ivy:makepom ivyfile="${root.base.dir}/ivy.xml" pomfile="${build.dir}/${project.name}.pom">
- <mapping conf="runtime" scope="compile"/>
- <mapping conf="runtime-web" scope="compile"/>
- <mapping conf="test" scope="test"/>
- </ivy:makepom>
- </target>
-
- <target name="release" depends="package,src.zip,makepom,javadoc,doc.all"
- description="Create all artifacts for a Apache Ki release">
- <property name="release.dir.name" value="${project.name}-${version}"/>
- <property name="release.zip.name" value="${release.dir.name}.zip"/>
- <property name="release.depzip.name" value="${release.dir.name}-with-dependencies.zip"/>
- <copy todir="${root.dist.dir}">
- <fileset dir="${root.base.dir}">
- <type type="file"/>
- <exclude name="**/build/**"/>
- <exclude name="**/.svn/**"/>
- <exclude name="**/out/**"/>
- <exclude name="**/lib/**"/>
- <exclude name="jsecurity.iml"/>
- <exclude name="jsecurity.ipr"/>
- <exclude name="jsecurity.iws"/>
- <exclude name="changes.txt"/>
- <exclude name="${release.dir.name}"/>
- </fileset>
- </copy>
- <zip destfile="${build.dir}/${release.zip.name}"
- basedir="${build.dir}"
- includes="${release.dir.name}/**"
- excludes="**/${release.zip.name},**/lib/**"/>
-
- <!-- Our ivy config puts copies of jars under lib directory according to the multiple build
-configuration targets. We don't want multiple copies in the dependency lib, because it would
-make the download size larger. Instead, just include one copy of each: -->
- <mkdir dir="${root.dist.dir}/lib"/>
- <copy todir="${root.dist.dir}/lib" overwrite="true" flatten="true">
- <fileset dir="${lib.dir}">
- <include name="**/*.jar"/>
- <exclude name="**/docbook/*.jar"/>
- </fileset>
- </copy>
- <zip destfile="${build.dir}/${release.depzip.name}"
- basedir="${build.dir}"
- includes="${release.dir.name}/**"
- excludes="**/${release.zip.name}, **/lib/docbook/docbook-dtd/**, **/lib/docbook/docbook-xsl/**, **/lib/docbook/*.jar"/>
- <delete dir="${root.dist.dir}/lib"/>
-
- </target>
-
- <!-- ===================================================================
- all - everything
- =================================================================== -->
- <target name="all" depends="release" description="Do everything"/>
-
-</project>
-
diff --git a/common.ant.xml b/common.ant.xml
deleted file mode 100644
index 0d89e55..0000000
--- a/common.ant.xml
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="common" default="package">
-
- <!-- Static property definitions. These will remain the same for any module or submodule. -->
- <property name="project.name" value="ki"/>
-
- <property name="root.base.dir" value="${basedir}"/>
-
- <!-- Allow override of default build properties from properties file. -->
- <property file="build.properties"/>
- <property file="${root.base.dir}/build.properties"/>
- <property file="${user.home}/.ki/build.properties"/>
-
- <!-- Environment variables (e.g. to pickup CATALINA_HOME for test deployment) -->
- <property environment="env"/>
-
- <!-- version of the product, see http://apr.apache.org/versioning.html for details on this convention -->
- <property name="version.major" value="1"/>
- <property name="version.minor" value="0"/>
- <property name="version.revision" value="0-SNAPSHOT"/>
- <property name="version" value="${version.major}.${version.minor}.${version.revision}"/>
- <property name="release.name" value="${project.name}-${version}"/>
-
- <!-- application-wide config files: (all other config files should be in a respective module or submodule) -->
- <property name="root.etc.dir" value="${root.base.dir}/etc"/>
- <property name="root.dist.dir" value="${root.base.dir}/build/${project.name}-${version}"/>
-
- <!-- All 3rd party libraries are in here: -->
- <property name="lib.dir" value="${root.base.dir}/lib"/>
-
- <!-- *RELATIVE* definitions. These properties will reflect a directory structure relative to where the
- sbuild is being executed -->
- <property name="base.dir" value="."/>
- <property name="etc.dir" value="${base.dir}/etc"/>
- <property name="src.dir" value="${base.dir}/src"/>
- <property name="test.dir" value="${base.dir}/test"/>
- <property name="build.dir" value="${base.dir}/build"/>
- <property name="classes.dir" value="${build.dir}/classes"/>
- <property name="test.classes.dir" value="${build.dir}/test-classes"/>
- <property name="docs.dir" value="${build.dir}/docs"/>
- <property name="test.docs.dir" value="${docs.dir}/test-reports"/>
- <property name="api.dir" value="${docs.dir}/api"/>
- <property name="dist.dir" value="${root.dist.dir}"/>
-
- <!-- compile flags, can be overridden on the command line using the -D flag -->
- <property name="compile.debug" value="true"/>
- <property name="compile.deprecation" value="false"/>
- <property name="compile.optimize" value="false"/>
-
- <property name="deploy.dir" value="${env.CATALINA_HOME}/webapps"/>
-
- <path id="all.libs">
- <fileset dir="${lib.dir}">
- <include name="**/*.jar"/>
- </fileset>
- <pathelement location="${classes.dir}"/>
- </path>
-
- <path id="test.path">
- <path refid="all.libs"/>
- <fileset dir="${dist.dir}">
- <include name="**/*.jar"/>
- </fileset>
- </path>
-
- <!-- ===================================================================
- - Clean all build files
- - =================================================================== -->
- <target name="clean" description="Cleans the entire project">
- <delete file="${dist.jar}"/>
- <delete dir="${build.dir}"/>
- </target>
-
- <macrodef name="compileMacro">
- <attribute name="classpathref" default="compile.path"/>
- <attribute name="srcdir" default="${src.dir}"/>
- <attribute name="destdir" default="${classes.dir}"/>
-
- <sequential>
- <mkdir dir="@{destdir}"/>
- <mkdir dir="@{destdir}/META-INF"/>
-
- <!-- 'compile.path' is expected to be defined in the module build.xml file -->
- <javac destdir="@{destdir}"
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}"
- failonerror="true"
- srcdir="@{srcdir}"
- classpathref="@{classpathref}">
- <!-- <compilerarg value="-Xlint:unchecked"/> -->
- </javac>
- <copy todir="@{destdir}" preservelastmodified="true">
- <fileset dir="@{srcdir}">
- <include name="**/*"/>
- <exclude name="**/*.java"/>
- <exclude name="**/*.tld"/>
- </fileset>
- </copy>
- <copy todir="@{destdir}/META-INF" flatten="true" preservelastmodified="true">
- <fileset dir="@{srcdir}">
- <include name="**/*.tld"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <target name="compile.src" description="Compiles sources">
- <!-- defaults are fine: -->
- <compileMacro/>
- </target>
-
- <target name="compile.test" description="Compiles test sources only">
- <compileMacro classpathref="test.path" srcdir="${test.dir}" destdir="${test.classes.dir}"/>
- </target>
-
- <target name="compile" depends="compile.src, compile.test" description="Compiles all sources"/>
-
- <target name="jar.jdk15" depends="compile" description="Create module jar file">
- <jar jarfile="${dist.jar}">
- <fileset dir="${classes.dir}">
- <include name="**"/>
- <exclude name="META-INF/**"/>
- </fileset>
- <metainf dir="${classes.dir}/META-INF">
- <include name="**"/>
- </metainf>
- <manifest>
- <attribute name="Implementation-Title" value="${project.name}-${module.name}"/>
- <attribute name="Implementation-Version" value="${version}"/>
- <attribute name="${project.name}-Version" value="${version}"/>
- <!-- Allow use of this JAR as a Java agent -->
- <!-- <attribute name="Premain-Class" value="org.kiment.InstrumentationSavingAgent" /> -->
- </manifest>
- </jar>
- </target>
-
- <target name="jar.retroweaver" depends="jar.jdk15" description="Create module jar file for JDK 1.3 and 1.4">
- <taskdef name="retroweaver" classname="net.sourceforge.retroweaver.ant.RetroWeaverTask"
- classpathref="all.libs"/>
- <mkdir dir="${dist.dir}/jdk13"/>
- <mkdir dir="${dist.dir}/jdk14"/>
- <retroweaver target="1.3" inputjar="${dist.jar}"
- outputjar="${dist.dir}/jdk13/${project.name}-${module.name}-jdk13-${version}.jar"/>
- <retroweaver target="1.4" inputjar="${dist.jar}"
- outputjar="${dist.dir}/jdk14/${project.name}-${module.name}-jdk14-${version}.jar"/>
- </target>
-
- <target name="jar" depends="jar.retroweaver"/>
-
- <target name="package" depends="jar"/>
-
-</project>
\ No newline at end of file
diff --git a/core/build.xml b/core/build.xml
deleted file mode 100644
index f486eb5..0000000
--- a/core/build.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="core" default="package">
-
- <property name="root.base.dir" value=".."/>
- <property name="module.name" value="core"/>
- <import file="${root.base.dir}/common.ant.xml"/>
- <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
- <property name="dist.jar" value="${dist.dir}/modules/${dist.jarName}.jar"/>
-
- <path id="compile.path">
- <fileset dir="${lib.dir}/${module.name}">
- <include name="*.jar"/>
- </fileset>
- </path>
-
-
-</project>
\ No newline at end of file
diff --git a/samples/quickstart/build.xml b/samples/quickstart/build.xml
deleted file mode 100644
index d1db4a8..0000000
--- a/samples/quickstart/build.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ 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 name="quickstart" default="package">
-
- <property name="root.base.dir" value="../.."/>
- <property name="module.name" value="samples-quickstart"/>
- <import file="${root.base.dir}/common.ant.xml"/>
- <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
- <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/>
- <property name="dist.warName" value="${project.name}-${module.name}-${version}"/>
- <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/>
-
- <path id="compile.path">
- <fileset dir="${lib.dir}/samples">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${dist.dir}/modules">
- <include name="${project.name}-core-${version}.jar"/>
- </fileset>
- </path>
-
- <path id="run.path">
- <pathelement location="${classes.dir}"/>
- <fileset dir="${lib.dir}/samples">
- <include name="commons-logging-*.jar"/>
- <include name="log4j-*.jar"/>
- <!-- Not normally needed, but mac os x JDK needs it for some reason: -->
- <include name="xercesImpl-*.jar"/>
- </fileset>
- <fileset dir="${root.dist.dir}" includes="${project.name}-${version}.jar"/>
- </path>
-
- <target name="compile" depends="compile.src"/> <!-- no test classes, no need to depend on compile.test -->
-
- <target name="run" depends="package" description="Runs the simple ${module.name} class">
- <java classname="Quickstart" classpathref="run.path"/>
- </target>
-
-</project>
\ No newline at end of file
diff --git a/samples/spring/etc/ehcache.xml b/samples/spring/src/main/resources/ehcache.xml
similarity index 100%
rename from samples/spring/etc/ehcache.xml
rename to samples/spring/src/main/resources/ehcache.xml
diff --git a/samples/spring/etc/jsecurity-sample.jks b/samples/spring/src/main/resources/jsecurity-sample.jks
similarity index 100%
rename from samples/spring/etc/jsecurity-sample.jks
rename to samples/spring/src/main/resources/jsecurity-sample.jks
Binary files differ
diff --git a/samples/spring/etc/sample-users.properties b/samples/spring/src/main/resources/sample-users.properties
similarity index 100%
rename from samples/spring/etc/sample-users.properties
rename to samples/spring/src/main/resources/sample-users.properties
diff --git a/samples/spring/etc/webstart.spring.xml b/samples/spring/src/main/resources/webstart.spring.xml
similarity index 100%
rename from samples/spring/etc/webstart.spring.xml
rename to samples/spring/src/main/resources/webstart.spring.xml
diff --git a/samples/standalone/build.xml b/samples/standalone/build.xml
deleted file mode 100644
index f68fc02..0000000
--- a/samples/standalone/build.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ 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 name="standalone" default="package">
-
- <property name="root.base.dir" value="../.."/>
- <property name="module.name" value="samples-standalone"/>
- <import file="${root.base.dir}/common.ant.xml"/>
- <property name="dist.jarName" value="${project.name}-${module.name}-${version}"/>
- <property name="dist.jar" value="${dist.dir}/samples/${dist.jarName}.jar"/>
- <property name="dist.warName" value="${project.name}-${module.name}-${version}"/>
- <property name="dist.war" value="${dist.dir}/samples/${dist.warName}.war"/>
-
- <path id="compile.path">
- <fileset dir="${lib.dir}/samples">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${dist.dir}/modules">
- <include name="${project.name}-core-${version}.jar"/>
- </fileset>
- </path>
-
- <path id="run.path">
- <pathelement location="${classes.dir}"/>
- <fileset dir="${lib.dir}/samples">
- <include name="commons-logging-*.jar"/>
- <include name="log4j-*.jar"/>
- <!-- Not normally needed, but mac os x JDK needs it for some reason: -->
- <include name="xercesImpl-*.jar"/>
- </fileset>
- <fileset dir="${root.dist.dir}" includes="${project.name}-${version}.jar"/>
- </path>
-
- <target name="compile" depends="compile.src"/> <!-- no test classes, no need to depend on compile.test -->
-
- <target name="run" depends="package" description="Runs the simple ${module.name} class">
- <java classname="Standalone" classpathref="run.path"/>
- </target>
-
-</project>
diff --git a/samples/standalone/src/MyRealm.java b/samples/standalone/src/main/java/MyRealm.java
similarity index 100%
rename from samples/standalone/src/MyRealm.java
rename to samples/standalone/src/main/java/MyRealm.java
diff --git a/samples/standalone/src/Standalone.java b/samples/standalone/src/main/java/Standalone.java
similarity index 100%
rename from samples/standalone/src/Standalone.java
rename to samples/standalone/src/main/java/Standalone.java
diff --git a/samples/standalone/src/ki.ini b/samples/standalone/src/main/resources/ki.ini
similarity index 100%
rename from samples/standalone/src/ki.ini
rename to samples/standalone/src/main/resources/ki.ini
diff --git a/samples/standalone/src/log4j.properties b/samples/standalone/src/main/resources/log4j.properties
similarity index 100%
rename from samples/standalone/src/log4j.properties
rename to samples/standalone/src/main/resources/log4j.properties
diff --git a/samples/web/build.xml b/samples/web/build.xml
index 0ba0a32..a6911b6 100644
--- a/samples/web/build.xml
+++ b/samples/web/build.xml
@@ -57,7 +57,7 @@
war - create distribution war (which will be used for deployment)
=================================================================== -->
<target name="war" description="Creates the samples webapp .war">
- <war warfile="${dist.war}" webxml="webroot/WEB-INF/web.xml">
+ <war warfile="${dist.war}" webxml="src/main/webapp/WEB-INF/web.xml">
<lib dir="${root.dist.dir}" includes="jsecurity-*.jar"/>
<lib dir="${lib.dir}/samples" includes="jstl-*.jar"/>
<lib dir="${lib.dir}/samples" includes="standard-*.jar"/>
diff --git a/samples/web/webroot/WEB-INF/web.xml b/samples/web/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from samples/web/webroot/WEB-INF/web.xml
rename to samples/web/src/main/webapp/WEB-INF/web.xml
diff --git a/samples/web/account/index.jsp b/samples/web/src/main/webapp/account/index.jsp
similarity index 100%
rename from samples/web/account/index.jsp
rename to samples/web/src/main/webapp/account/index.jsp
diff --git a/samples/web/webroot/home.jsp b/samples/web/src/main/webapp/home.jsp
similarity index 100%
rename from samples/web/webroot/home.jsp
rename to samples/web/src/main/webapp/home.jsp
diff --git a/samples/web/webroot/include.jsp b/samples/web/src/main/webapp/include.jsp
similarity index 100%
rename from samples/web/webroot/include.jsp
rename to samples/web/src/main/webapp/include.jsp
diff --git a/samples/web/webroot/index.jsp b/samples/web/src/main/webapp/index.jsp
similarity index 100%
rename from samples/web/webroot/index.jsp
rename to samples/web/src/main/webapp/index.jsp
diff --git a/samples/web/webroot/login.jsp b/samples/web/src/main/webapp/login.jsp
similarity index 100%
rename from samples/web/webroot/login.jsp
rename to samples/web/src/main/webapp/login.jsp
diff --git a/samples/web/webroot/logout.jsp b/samples/web/src/main/webapp/logout.jsp
similarity index 100%
rename from samples/web/webroot/logout.jsp
rename to samples/web/src/main/webapp/logout.jsp
diff --git a/samples/web/webroot/style.css b/samples/web/src/main/webapp/style.css
similarity index 100%
rename from samples/web/webroot/style.css
rename to samples/web/src/main/webapp/style.css
diff --git a/samples/web/webroot/WEB-INF/classes/log4j.properties b/samples/web/webroot/WEB-INF/classes/log4j.properties
deleted file mode 100644
index 3ffb74c..0000000
--- a/samples/web/webroot/WEB-INF/classes/log4j.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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.
-#
-# This file is used to format all logging output
-log4j.rootLogger=TRACE, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%c]: %m%n
-
-# =============================================================================
-# 3rd Party Libraries
-# OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL
-# =============================================================================
-# ehcache caching manager:
-log4j.logger.net.sf.ehcache=WARN
-
-# Most all Apache libs:
-log4j.logger.org.apache=WARN
-
-# Quartz Enterprise Scheular (java 'cron' utility)
-log4j.logger.org.quartz=WARN
-
-# =============================================================================
-# Apache Ki
-# =============================================================================
-# Apache Ki security framework
-log4j.logger.org.apache.ki.realm.text.PropertiesRealm=INFO
-log4j.logger.org.apache.ki.cache.ehcache.EhCache=INFO
-log4j.logger.org.apache.ki.io=INFO
-log4j.logger.org.apache.ki.web.servlet=INFO
-log4j.logger.org.apache.ki.util.ThreadContext=INFO
diff --git a/samples/web/webroot/account/index.jsp b/samples/web/webroot/account/index.jsp
deleted file mode 100644
index 779bb93..0000000
--- a/samples/web/webroot/account/index.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<%--
- ~ 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.
- --%>
-<%@ include file="../include.jsp" %>
-
-<html>
-<head>
- <link type="text/css" rel="stylesheet" href="<c:url value="/style.css"/>"/>
-</head>
-<body>
-
-<h2>Users only</h2>
-
-<p>You are currently logged in.</p>
-
-<p><a href="<c:url value="/home.jsp"/>">Return to the home page.</a></p>
-
-<p><a href="<c:url value="/logout.jsp"/>">Log out.</a></p>
-
-</body>
-</html>
\ No newline at end of file