# ldap-maven-plugin
**Repository Path**: mirrors_atlassian/ldap-maven-plugin
## Basic Information
- **Project Name**: ldap-maven-plugin
- **Description**: A Maven plugin that runs an embedded LDAP directory server within the Maven build life-cycle and imports/exports data to/from an LDAP directory server.
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2026-07-25
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
DO NOT USE THIS REPO - USE https://bitbucket.org/atlassian/ldap-maven-plugin/src/master/
LDAP Maven Plugin
=================
  
The [LDAP Maven Plugin](http://ldap-maven-plugin.btmatthews.com/) is a [Maven](http://maven.apache.org) plugin that
can:
* Import/export data to/from an [LDAP](http://en.wikipedia.org/wiki/LDAP) directory server. Both the:
[LDIF](http://en.wikipedia.org/wiki/LDIF) and [DSML](http://en.wikipedia.org/wiki/Directory_Service_Markup_Language)
formats are supported.
* Launch and shutdown a LDAP directory server in the Maven build life-cycle. The plugin supports the following LDAP
directory servers:
* [ApacheDS](http://directory.apache.org/apacheds/)
* [UnboundID](https://www.unboundid.com/products/ldap-sdk/)
Importing or exporting data
---------------------------
The plugin provides the following goals to import or export content from a LDAP directory server:
* [load](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/load-mojo.html) is used to
load content from a file into a LDAP directory server.
* [dump](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/dump-mojo.html) is used to
dump content to a file from a LDAP directory sever.
The following file formats are supported
* [LDIF](http://en.wikipedia.org/wiki/LDIF) - LDAP Directory Interchange Format
* [DSML](http://en.wikipedia.org/wiki/Directory_Service_Markup_Language) - Directory Services
Markup Language
### LDAP Data Interchange Format (LDIF)
#### Import
The following **POM** fragment demonstrates how to load content into a LDAP directory server from a
[LDIF](http://en.wikipedia.org/wiki/LDIF) formatted file using the
[load](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/load-mojo.html)
goal of the **LDAP Maven Plugin**.
```xml
com.btmatthews.maven.plugins
ldap-maven-plugin
1.3.2
load
load
localhost
10389
uid=admin,ou=system
secret
load.ldif
```
#### Export
The following **POM** fragment demonstrates how to export content from a LDAP directory server to a
[LDIF](http://en.wikipedia.org/wiki/LDIF) formatted file using the
[dump](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/dump-mojo.html)
goal of the **LDAP Maven Plugin**.
```xml
com.btmatthews.maven.plugins
ldap-maven-plugin
1.3.2
dump
dump
localhost
10389
uid=admin,ou=system
secret
dc=btmatthews,dc=com
dump.ldif
ldif
```
### Directory Service Markup Language (DSML)
#### Import
The following **POM** fragment demonstrates how to load content into a LDAP directory server from a
[DSML](http://en.wikipedia.org/wiki/Directory_Service_Markup_Language) formatted file using the
[load](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/load-mojo.html)
goal of the **LDAP Maven Plugin**.
```xml
com.btmatthews.maven.plugins
ldap-maven-plugin
1.3.2
load
load
localhost
10389
uid=admin,ou=system
secret
${basedir}/load.dsml
```
#### Export
The following **POM** fragment demonstrates how to export content from a LDAP directory server to a
[DSML](http://en.wikipedia.org/wiki/Directory_Service_Markup_Language) formatted file using the
[dump](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/dump-mojo.html)
goal of the **LDAP Maven Plugin**.
```xml
com.btmatthews.maven.plugins
ldap-maven-plugin
1.3.2
dump
dump
localhost
10389
uid=admin,ou=system
secret
dc=btmatthews,dc=com
dump.dsml
dsml
```
Running an LDAP Server in the build life-cycle
----------------------------------------------
### pom.xml
The following **POM** fragment uses the
[run](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/run-mojo.html) goal to launch an
embedded LDAP directory server prior to the execution of the integration tests and then uses the
[stop](http://ldap-maven-plugin.btmatthews.com//ldap-maven-plugin/stop-mojo.html) goal to shutdown
the embedded LDAP directory server upon completion of the integration tests.
```xml
com.btmatthews.maven.plugins
ldap-maven-plugin
1.3.2
com.btmatthews.maven.plugins
ldap-maven-plugin
11389
ldap
true
start-ldap
run
pre-integration-test
stop-ldap
stop
post-integration-test
```
### Connecting in Java
The following LDAP client libraries can be used to connect to the embedded LDAP server:
* [UnboundID LDAP SDK for Java](http://www.unboundid.com/products/ldapsdk/)
* [ApacheDS Directory LDAP API](http://directory.apache.org/api/)
* [Spring LDAP](http://projects.spring.io/spring-ldap/)
The [LDAPUnit](https://github.com/bmatthews68/ldapunit) library provides an assortment of assertion and
verification methods for use in unit and integration test cases.
Maven Central Coordinates
-------------------------
The **LDAP Maven Plugin** has been published in [Maven Central](http://search.maven.org) at the following
coordinates:
```xml
com.btmatthews.maven.plugins
ldap-maven-plugin
1.3.2
```
**Note:** If you want to use [OpenDJ](http://opendj.forgerock.org/) you will also need to add the following
repository to your **pom.xml** or **settings.xml** file since the [ForgeRock](https://www.forgerock.com/) dependencies
are not available from [Maven Central](http://search.maven.org).
```xml
maven.forgerock.org
maven.forgerock.org-releases
http://maven.forgerock.org/repo/releases
```
License & Source Code
---------------------
The **LDAP Maven Plugin** is made available under the
[Apache License](http://www.apache.org/licenses/LICENSE-2.0.html) and the source code is hosted on
[GitHub](http://github.com) at https://github.com/bmatthews68/ldap-maven-plugin.