| <!-- |
| 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="fortress-core-multitenancy-demo" default="build" basedir="."> |
| |
| <import file="build.xml"/> |
| |
| <!-- ================================= |
| target: test-full - runs junit regression tests |
| ================================= --> |
| <target name="mt-test" depends="init" description="--> run junit regression tests for multitenancy"> |
| <echo message="Run the Fortress regression JUnit tests. Be patient this can take a while to complete."/> |
| <junit fork="yes" haltonfailure="${test.failonerror}" showoutput="${test.showoutput}" maxmemory="1024m"> |
| <sysproperty key="isFirstJUnitRun" value="false"/> |
| <sysproperty key="version" value="${version}"/> |
| <sysproperty key="tenant" value="${tenant}"/> |
| <classpath refid="test.class.path"/> |
| <formatter type="plain" usefile="false"/> |
| <test name="${test.regression.entry}"/> |
| </junit> |
| </target> |
| |
| <!-- ================================= |
| target: admin - runs the Ant demo load scripts |
| ================================= --> |
| <target name="mt-admin" depends="init" description="--> mt-admin -Dparam1=path/to/FileName.xml : to run fortress admin scripts at specified location"> |
| <echo message="############### Run Fortress Ant script param1: ${param1} tenant: ${tenant} version: ${version} ###############"/> |
| <java |
| classname="org.apache.tools.ant.launch.Launcher" |
| fork="true" |
| failonerror="true" |
| dir="${ldap.setup.dir}" |
| timeout="4000000" |
| taskname="startAnt"> |
| <classpath> |
| <pathelement location="${ant.home}/lib/ant-launcher.jar"/> |
| <path refid="bootstrap.class.path"/> |
| <path refid="test.class.path"/> |
| </classpath> |
| <sysproperty key="version" value="${version}"/> |
| <sysproperty key="tenant" value="${tenant}"/> |
| <arg value="-buildfile"/> |
| <arg file="${param1}"/> |
| <arg value="-Dbasedir=${ldap.setup.dir}"/> |
| </java> |
| </target> |
| |
| <!-- ================================= |
| Multi-tenancy Demo HOME |
| ================================= --> |
| <target name="mt-demo0" depends="init" description="--> run multitenancy demo for HOME"> |
| <antcall target="mt-test"> |
| <param name="tenant" value="HOME"/> |
| </antcall> |
| </target> |
| |
| <!-- ================================= |
| Multi-tenancy Demo Client123 |
| ================================= --> |
| <target name="mt-demo1" depends="init" description="--> run multitenancy demo for Client 123"> |
| <antcall target="mt-admin"> |
| <param name="param1" value="${load.demo.script}"/> |
| <param name="tenant" value="Client123"/> |
| </antcall> |
| <antcall target="mt-test"> |
| <param name="tenant" value="Client123"/> |
| </antcall> |
| </target> |
| <!-- ================================= |
| Multi-tenancy Demo Client456 |
| ================================= --> |
| <target name="mt-demo2" depends="init" description="--> run multitenancy demo for Client 456"> |
| <antcall target="mt-admin"> |
| <param name="param1" value="${load.demo.script}"/> |
| <param name="tenant" value="Client456"/> |
| </antcall> |
| <antcall target="mt-test"> |
| <param name="tenant" value="Client456"/> |
| </antcall> |
| </target> |
| <!-- ================================= |
| Multi-tenancy Demo Client789 |
| ================================= --> |
| <target name="mt-demo3" depends="init" description="--> run multitenancy demo for Client 789"> |
| <antcall target="mt-admin"> |
| <param name="param1" value="${load.demo.script}"/> |
| <param name="tenant" value="Client789"/> |
| </antcall> |
| <antcall target="mt-test"> |
| <param name="tenant" value="Client789"/> |
| </antcall> |
| </target> |
| |
| </project> |