Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Custom Schema

Warning
titleWarning

This page needs to be overworked

Background

ApacheDS 1.0 does not support dynamic schema updates via the LDAP protocol. This feature will be added in the future however you can still change the schema used by ApacheDS. It just requires a restart.

...

No Format
svn co http://svn.apache.org/repos/asf/directory/releasesapacheds/apachedstags/1.0.02/schema-archetype/ 
cd schema-archetype
mvn install

Once the archetype is installed you can now generate a schema project with it. Let's presume we want to generate a schema project where our schema is in a package called com.acme and the generated artifact's id is foo-schema. You can either use Maven directly to generate this project or you can use the shell script that's sitting in the schema-archetype directory you just checked out. Here's how to get Maven to generate your foo-schema project for the com.acme package and groupId:

No Format
mvn archetype:create -DarchetypeGroupId=org.apache.directory.server \
                     -DarchetypeArtifactId=apacheds-schema-archetype \
                     -DarchetypeVersion=1.0.0 \
                     -DgroupId=com.acme -DartifactId=foo-schema
apacheds-schema-archetype.sh com.acme foo-schema
Warning

To make this command working, you must be in another directory than the schema-archetype directory. For instance, after the first command (mvn install), just cd to the parent directory :
cd ..
then launch the script:
schema-archetype/apacheds-schema-archetype.sh com.acme foo-schema

Once you've generated with success you'll see a new foo-schema directory created. This is the maven module that will generate your schema file. From the onset we included an example schema called car.schema which has a few attributeTypes defined and a car objectClass. It's there as a placeholder. Before we go into how to customize this stuff let's look at the tree of the new project:

...