Service Provider provides a REF kit to help you implement the product. This kit is located in the idmspe-refkit.zip file in the root directory of the installation media. The kit contains the following:
JAR files needed to develop and deploy Service Provider custom code.
A sample Java file (ApiUsage.java) that implements the most important features of the LighthouseContext and IDMXUser view.
A sample Java file (SpmlUsage.java) that demonstrates how to use implement Service Provider using SPML.
Several sample audit handlers, filters, and formatters.
Authentication/authorization filter used in the sample end-user pages.
The build.xml file, which is an Ant script that can be used to build, deliver, and test source.
Javadocs
The REF kit has the following requirements:
Optional for testing:
JUnit 3.8.x or higher
You might also need to copy any additional JAR files to the lib directory. The build will automatically load the JAR files for both compiling and testing.
See http://ant.apache.org for more information about using Ant.
Use the following general procedure to set up your development and testing environment. Refer to the JDK and Ant documentation for detailed instructions.
Install JDK 1.5 or higher.
Install Apache Ant 1.6.3 or higher.
Set the JAVA_HOME environment variable to point to the JDK. For example:
JAVA_HOME=c:\jdk-1.5.0_x |
Set the ANT_HOME environment variable to point to Ant. For example:
ANT_HOME=c:\apache-ant-1.6.3 |
Add JAVA_HOME\bin and ANT_HOME\bin the PATH environment variable.
Install the REF kit.
mkdir spe-dev copy idmspe-refkit.zip spe-dev cd spe-dev unzip idmspe-refkit.zip |
You are now ready to change directories to spe-dev and run ant. You may run ant with or without an optional target. To specify a target, enter ant TargetName, such as ant compile. If you do not specify a target, ant will build everything in the src directory and create a JAR file in a new directory, dist.
The following table lists the possible targets.
Target |
Description |
---|---|
init |
Initializes the build environment by creating dependent directories. |
compile |
Compiles all source in the src directory into the build directory. |
resources |
Copies all non-Java source files into the build directory. This is for properties file support and other embedded resources. |
dist |
Create a JAR file from the files in the build directory into the dist directory. The name of the JAR will be the project name specified at the top of the build.xml file “MyProject” and a timestamp. |
clean |
Removes the dist, build, and reports directories and remove all .class files from the test directory. |
test |
Calls the compile, resources, test-compile, and test-run targets (in that order), then runs the JUnit reports task on the results to produce both HTML and text reports on the success or failure of the tests. The reports are written to the reports directory. |
test-run |
Calls the compile, resources, and test-compile targets. Then it runs each test case within the test directory whose file name contains the pattern *Tests.java. |
test-compile |
Calls the compile, and resource targets, then compiles all the files within the test directory. |