Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Background

ApacheDS 1.0 .x 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/branchesreleases/apacheds/1.0.0/schema-archetype/
cd schema-archetype
mvn install

...

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

...

  1. rename car.schema to my.schema for now ( you can edit the contents later )
  2. on line 50 edit the pom.xml replacing the content in the <name> tag which is car in the plugin section to my
  3. feel free to change the dependencies of your schema (see schema dependencies section for more info)
  4. on line 62 rename CarSchema to MySchema in the TestCase file foo-schema/src/test/java/com/acme/SchemaTest.java
  5. if you changed the contents of car.schema you'll want to change the test methods of the SchemaTest. Otherwise, you may want to remove the test.
Warning
titleCompiling your schema

Before creating your schema with "mvn package", you must type "mvn clean". If you don't do that, the tests will be run agaisnt the modified schema, - if you didn't modified the tests - and you will get a maven failure (likely) !

You can also rename the java test file to avoid tests failure (don't forget to do a "mvn clean" anyway !)

Schema Dependencies

In the pom.xml you saw a section where you can list schemas which your schema depends on. As you might already know your attributeType descriptions and your objectClass descriptions may depend on objects defined in other schemas. If so you'll need to add the appropriate dependency schemas. If at any point there is a question of which schema contains your dependencies you can grep the files here:

...