Today I sat down and started doing integration test with Apache DS 1.0.1
following the approach laid out in this article:
http://directory.apache.org/apacheds/1.0/using-apacheds-for-unit-tests.html
Out of the gate I ran into an issue with nlog4j getting an
IncompatibleClassChangeError exception which took bit of time to
resolve. I read for a while on mail archives finding the proposed
solution is to do 'some excluding with maven2 of slf4j'.
To resolve this I have organized our maven2 pom.xml as such:
<dependency>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-server-unit</artifactId>
<version>1.0.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>nlog4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
Hopefully this helps for the next person. The Apache DS server project
is really going make a difference around here and hope more people use
it when testing their LDAP connectors.
For the Apache DS team I have a few quick comments that may or may not
help to make things easier in the future:
Turn on comments for most of your documentation pages
(http://directory.apache.org/apacheds/1.0/). Once problems/bugs are
fixed remove the comments or fold the suggestions into the
documentation. Often users who can immediately comment on something are
more likely to help than emailing a list or filing a bug report. A great
example of this would be the MySQL project documentation.
Avoid using 'odd' libraries like nlog4j, from what I can see after
trying to resolve these issues through Google, the API is not likely to
just spin it's wheels only having boutique integrations. The easier
something is to integrate the more likely it is to be used. A perfect
example of this is how unit test can be integrated with JUnit and I will
no longer need and external OpenLDAP server.
Cheers,
Justen
--
ATLASSIAN - http://www.atlassian.com
Australia's Fastest Growing Software Company 2005-06 [BRW Magazine]