<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
+ <classpathentry kind="src" path="tests"/>
+ <classpathentry kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/>
<classpathentry kind="lib" path="webApplication/WEB-INF/lib/commons-beanutils.jar"/>
<classpathentry kind="lib" path="webApplication/WEB-INF/lib/commons-collections.jar"/>
<classpathentry kind="lib"
<classpathentry kind="lib" path="lib/xercesImpl-2.2.1.jar" sourcepath="/Shibboleth/lib/xercesImpl-2.2.1-src.jar"/>
<classpathentry kind="lib" path="lib/ant-1.5.1.jar"/>
<classpathentry kind="lib" path="lib/ant-optional-1.5.1.jar"/>
- <classpathentry kind="output" path="webApplication\WEB-INF\classes"/>
+ <classpathentry kind="output" path="webApplication/WEB-INF/classes"/>
</classpath>
<property name="distname" value="shibboleth" />
<property name="root" value="." />
<property name="src" value="${root}/src/" />
+ <property name="tests" value="${root}/tests/" />
<property name="approot" value="${root}/webApplication/" />
<property name="appconfig" value="${src}/conf/" />
<property name="configroot" value="${root}/webAppConfig/" />
<!-- This target should be run before checking code into the repository -->
- <target name="pre-checkin" depends="compile-all, test-all, clean-all" />
+ <target name="pre-checkin" depends="compile, test-all, clean-all" />
<!-- Compile classes and move them to ${build} -->
- <target name="compile-all" depends="init">
+ <target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}" includes="**/*.java" debug="on">
<classpath refid="build.path" />
</javac>
<fileset dir="${src}/conf"/>
</copy>
</target>
+
+ <target name="compile-tests" depends="compile">
+ <javac srcdir="${tests}" destdir="${build}" includes="**/*.java" debug="on">
+ <classpath refid="build.path" />
+ </javac>
+ </target>
<!-- Generate API docs -->
<!-- Create various product distributions and move them to ${dist} -->
<target name="dist" depends="dist-all" />
- <target name="dist-all" depends="compile-all, test-all, package-all, clean-build" />
+ <target name="dist-all" depends="compile, test-all, package-all, clean-build" />
<target name="package-all">
<war warfile="${dist}/${distname}.war" webxml="${configroot}/all.xml" basedir="${approot}" update="no" />
</target>
- <target name="dist-origin" depends="compile-all, test-origin, package-origin, clean-build" />
+ <target name="dist-origin" depends="compile, test-origin, package-origin, clean-build" />
<target name="package-origin">
<war warfile="${dist}/${distname}.war" webxml="${configroot}/origin.xml" basedir="${approot}" update="no" />
</target>
<!-- Build utilities -->
- <target name="build-util" depends="compile-all">
+ <target name="build-util" depends="compile">
<jar jarfile="${distlibs}/shib-util.jar" basedir="${build}" />
</target>
- <target name="dist-wayf" depends="compile-all, test-wayf, package-wayf, clean-build" />
+ <target name="dist-wayf" depends="compile, test-wayf, package-wayf, clean-build" />
<target name="package-wayf">
<war warfile="${dist}/${distname}-wayf.war" webxml="${configroot}/wayf.xml" basedir="${approot}" update="no" />
</target>
</junit>
</target>
<target name="test-wayf" depends="test-common" />
- <target name="test-common" depends="compile-all"/>
+ <target name="test-common" depends="compile-tests"/>
- <target name="genSecret" depends="compile-all">
+ <target name="genSecret" depends="compile">
<taskdef name="genSecret" classname="edu.internet2.middleware.shibboleth.utils.HandleRepositorySecretGenerator" classpathref="build.path"/>
<genSecret keyStorePath="${appconfig}/handle.jks" keyStorePassword="shibhs" keyStoreKeyAlias="handleKey" keyStoreKeyPassword="shibhs" />
</target>
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
+import edu.internet2.middleware.shibboleth.aa.arp.Arp;
+import edu.internet2.middleware.shibboleth.aa.arp.ArpAttribute;
+import edu.internet2.middleware.shibboleth.aa.arp.ArpEngine;
+import edu.internet2.middleware.shibboleth.aa.arp.ArpException;
+import edu.internet2.middleware.shibboleth.aa.arp.ArpRepository;
+import edu.internet2.middleware.shibboleth.aa.arp.ArpRepositoryException;
+import edu.internet2.middleware.shibboleth.aa.arp.ArpRepositoryFactory;
+import edu.internet2.middleware.shibboleth.aa.arp.MatchFunction;
import edu.internet2.middleware.shibboleth.common.*;
/**
//Test ARP description
try {
- InputStream inStream = new FileInputStream("test/arp1.xml");
+ InputStream inStream = new FileInputStream("data/arp1.xml");
parser.parse(new InputSource(inStream));
Arp arp1 = new Arp();
arp1.marshall(parser.getDocument().getDocumentElement());
//Test case where ARP description does not exist
try {
- InputStream inStream = new FileInputStream("test/arp2.xml");
+ InputStream inStream = new FileInputStream("data/arp2.xml");
parser.parse(new InputSource(inStream));
Arp arp2 = new Arp();
arp2.marshall(parser.getDocument().getDocumentElement());
URI[] list3 = new URI[0];
//Test with just a site ARP
- InputStream inStream = new FileInputStream("test/arp1.xml");
+ InputStream inStream = new FileInputStream("data/arp1.xml");
parser.parse(new InputSource(inStream));
Arp arp1 = new Arp();
arp1.marshall(parser.getDocument().getDocumentElement());
new HashSet(Arrays.asList(list1)));
//Test with site and user ARPs
- inStream = new FileInputStream("test/arp7.xml");
+ inStream = new FileInputStream("data/arp7.xml");
parser.parse(new InputSource(inStream));
Arp arp7 = new Arp();
arp7.setPrincipal(principal1);
new HashSet(Arrays.asList(list2)));
//Ensure that explicit denies on any value are not in the release set
- inStream = new FileInputStream("test/arp6.xml");
+ inStream = new FileInputStream("data/arp6.xml");
parser.parse(new InputSource(inStream));
Arp arp6 = new Arp();
arp6.setPrincipal(principal1);