Added default page in web app, removed unnecessary files, and added some setup documentation.

This commit is contained in:
Mattias Arthursson
2008-06-19 08:12:33 +00:00
parent 86f5d7ed71
commit 1fc4824a66
12 changed files with 26 additions and 220 deletions

View File

@@ -1,18 +0,0 @@
<?xml version="1.0"?>
<project name="spring-ldap-article-sample" default="dist">
<property file="build.properties" />
<property file="project.properties" />
<property file="${common.build.dir}/build.properties" />
<property file="${common.build.dir}/project.properties" />
<property file="${user.home}/build.properties" />
<import file="${common.build.dir}/common-targets.xml" />
<!-- extend common-build with source capability -->
<target name="build.prepare.make.config.dirs" depends="common-targets.build.prepare.make.config.dirs">
<mkdir dir="${lib.dir}/source" />
</target>
</project>

View File

@@ -1,9 +0,0 @@
dn: dc=jayway,dc=se
objectclass: dcObject
objectclass: organization
o: jayway
dc: jayway
dn: cn=Manager,dc=jayway,dc=se
objectclass:organizationalRole
cn: Manager

View File

@@ -1,21 +0,0 @@
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
#BASE dc=example, dc=com
#URI ldap://ldap.example.com ldap://ldap-master.example.com:666
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
include "[open_ldap_path]/schema/core.schema"
#include "c:/Program Files/OpenLDAP/schema/inetorgperson.schema"
database bdb
suffix "dc=jayway,dc=se"
rootdn "cn=Manager,dc=jayway,dc=se"
rootpw secret
directory "[open_ldap_path]/data"

View File

@@ -1,52 +0,0 @@
LDAP server setup for samples.
We need to semi-manually set up the server environment. I have used
OpenLDAP (http://www.openldap.org/) with a minimal amount of data set up from an
LDIF file.
There is a Windows version of OpenLDAP available at:
http://lucas.bergmans.us/hacks/openldap/
The LDIF file and sample application both expect to find the base suffix
"dc=jayway,dc=se" in the LDAP Server.
For help in setting up the LDAP environment, three files are supplied:
1. ldap.conf.example
Modify paths in this file to suit your installation by replacing
the placeholder [open_ldap_path].
2. base_data.ldif
Base domain and Admin data as specified in ldap.conf.
3. setup_data.ldif
The data expected by the integration test cases.
Start the LDAP Server:
slapd -d 1 -f ldap.conf.example
Add the LDIF files (the default password in ldap.conf.example is "secret"):
ldapadd -x -D "cn=Manager,dc=jayway,dc=se" -W -f base_data.ldif
ldapadd -x -D "cn=Manager,dc=jayway,dc=se" -W -f setup_data.ldif
Verify the installation by running this search:
ldapsearch -LLL -b dc=jayway,dc=se "(objectclass=*)" dn
It should result in a list that looks like this:
dn: dc=jayway,dc=se
dn: cn=Manager,dc=jayway,dc=se
dn: c=Sweden,dc=jayway,dc=se
dn: c=Norway,dc=jayway,dc=se
...
You should now be all set to run the integration tests.
If you choose to run the tests on another instance, or specifically with
another suffix than the one mentioned above, you may need to modify data in
the following files:
setup_data.ldif
/src/iutest/config/ldap.properties

View File

@@ -1,70 +0,0 @@
dn: c=Sweden,dc=jayway,dc=se
objectclass: top
objectclass: country
c: Sweden
description: The country of Sweden
dn: c=Norway,dc=jayway,dc=se
objectclass: top
objectclass: country
c: Norway
description: The country of Norway
dn: ou=company1,c=Sweden,dc=jayway,dc=se
objectclass: top
objectclass: organizationalUnit
ou: company1
description: First company in Sweden
dn: ou=company2,c=Sweden,dc=jayway,dc=se
objectclass: top
objectclass: organizationalUnit
ou: company2
description: Second company in Sweden
dn: ou=company1,c=Norway,dc=jayway,dc=se
objectclass: top
objectclass: organizationalUnit
ou: company1
description: First company in Norway
dn: cn=Some Person,ou=company1,c=Sweden,dc=jayway,dc=se
objectclass: top
objectclass: person
cn: Some Person
sn: Person
description: Sweden, Company1, Some Person
telephoneNumber: +46 555-123456
dn: cn=Some Person2,ou=company1,c=Sweden,dc=jayway,dc=se
objectclass: top
objectclass: person
cn: Some Person2
sn: Person2
description: Sweden, Company1, Some Person2
telephoneNumber: +46 555-654321
dn: cn=Some Person3,ou=company1,c=Sweden,dc=jayway,dc=se
objectclass: top
objectclass: person
cn: Some Person3
sn: Person3
description: Sweden, Company1, Some Person3
telephoneNumber: +46 555-123654
dn: cn=Some Person,ou=company2,c=Sweden,dc=jayway,dc=se
objectclass: top
objectclass: person
cn: Some Person
sn: Person
description: Sweden, Company2, Some Person
telephoneNumber: +46 555-456321
dn: cn=Some Person,ou=company1,c=Norway,dc=jayway,dc=se
objectclass: top
objectclass: person
cn: Some Person
sn: Person
description: Norway, Company1, Some Person
telephoneNumber: +45 555-654123

View File

@@ -1,3 +0,0 @@
c=Sweden,dc=jayway,dc=se
c=Norway,dc=jayway,dc=se

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.jayasoft.org/misc/ivy/samples/ivy.xsd">
<info organisation="org.springframework" module="spring-ldap-article-sample" />
<configurations>
<conf name="default" extends="global" />
<conf name="global" visibility="private" />
<conf name="buildtime" visibility="private" />
<conf name="test" visibility="private" />
<conf name="source" visibility="public" />
</configurations>
<dependencies defaultconf="global->default">
<!-- global dependencies -->
<dependency org="commons-logging" name="commons-logging" rev="1.0.4" />
<dependency org="log4j" name="log4j" rev="1.2.9" />
<dependency org="org.springframework" name="spring-ldap" rev="latest.integration"
conf="global->default;source->@" />
<!-- build time only dependencies -->
<!-- test-time only dependencies -->
<dependency org="com.cenqua.clover" name="clover" rev="1.3.12" conf="test->default" />
<dependency org="org.springframework" name="spring-mock" rev="2.0.8" conf="test->default" />
<dependency org="junit" name="junit" rev="3.8.2" conf="test->default" />
<dependency org="easymock" name="easymock" rev="1.2_Java1.3" conf="test->default"/>
</dependencies>
</ivy-module>

View File

@@ -1,10 +0,0 @@
# properties defined in this file are overridable by a local build.properties in this project dir
# The location of the common build system
common.build.dir=${basedir}/../common-build
javac.source=1.3
javac.target=1.3
# extend common-build with source capability
main.build.configs=global,buildtime,test,source

View File

@@ -1 +1,17 @@
For setup instructions on how to run this sample project, see docs/readme.txt.
Sample application demonstrating how to do the most basic stuff in Spring LDAP
A very simple dao implementation is provided in
org.springframework.ldap.samples.article.dao.PersonDaoImpl
It demonstrates some basic operations using Spring LDAP. For recerence purposes,
a corresponding implementation using ordinary Java LDAP/JNDI implementation is
available in TraditionalPersonDaoImpl.
How to use:
-----------
The project is in a maven build structure. Make sure you have installed the samples-utils artifact, as this will be
needed for this project to work.
mvn jetty:run will start up a web server demonstrating the capabilities. The web application will be available
under http://localhost:8080/spring-ldap-person-article/
mvn eclipse:eclipse will construct an eclipse project for you to use. Import that project into eclipse using
File/Import/Existing Project, and select this directory.

View File

@@ -1,5 +0,0 @@
<html>
<body>
Hello
</body>
</html>

View File

@@ -27,4 +27,8 @@
<servlet-name>basic</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
</web-app>

View File

@@ -0,0 +1,5 @@
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=showTree.do">
</head>
</html>