ApacheDS does not have a GA release that is compatible with JDK 11.
The Spring Security LDAP samples use ApacheDSContainer for convenience in setup. However, UnboundIdContainer is compatible with JDK 11, meaning that their dependency on ApacheDSContainer is not necessary.