The LDAP Maven Plugin was relying on the jcabi-aether library to resolve dependencies. When I first wrote the LDAP Maven Plugin I couldn’t find much information on how to resolve dependencies and jcabi-aether proved to be invaluable. Aether is dependency resolution framework used under the hood by Maven 3 and higher.
Since I wanted to the maintain support for Maven 3.0.5 I decided to revert to the Maven 2 dependency resolution API.
In addition, I downgraded the version of ApacheDS used by the plugin to 1.5.5. I was having trouble resolving one of the transitive dependencies for 2.0.0-M15 during integration testing and I didn’t have any luck using the latest version (2.0.0-M17) or later. So I decided to downgrade for now and revisit the issue when ApacheDS 2.0.0 is released and documentation on embedding it becomes available.
I am pleased to announce the availability of the In-Memory Database Maven Plugin version 1.4.0.
This release adds two new configuration settings:
- <skip/> can be used to skip executing the plugin goals.
- <attributes/> can be used to append additional options to the JDBC url connection string.
The <skip/> configuration option can be specified in the <configuration/> section for the plugin or an individual plugin execution. Typically this would be used to disable unit or integration tests:
The same can also be achieved passing the inmemdb.skip system property on the Maven command line:
$ mvn -Dinmemdb.skip clean install
Additional attributes can be appended to the JDBC URL connection string using the <attributes/> element nested inside the <configuration/> section for the plugin or an individual plugin execution. For example:
<attributes> <territory>ga_IE</territory> </attributes>
Maven Central Coordinates
The In-Memory Database Maven Plugin has been published in Maven Central at the following coordinates:
<plugin> <groupId>com.btmatthews.maven.plugins.inmemdb</groupId> <artifactId>inmemdb-maven-plugin</artifactId> <version>1.4.0</version> </plugin>
This project contains contributions from:
The In-Memory Database Maven Plugin is made available under the Apache License and the source code is hosted on GitHub at https://github.com/bmatthews68/inmemdb-maven-plugin.
- Import/export data to/from a LDAP directory server. Both the LDIF and DSML formats are supported.
- Launch and shutdown a LDAP directory server in the Maven build life-cycle. The plugin supports the following LDAP directory servers:
Importing or exporting data
The plugin provides the following goals to import or export content from a LDAP directory server:
- load is used to load content from a file into a LDAP directory server.
- dump is used to dump content to a file from a LDAP directory sever.
The following file formats are supported:
LDAP Data Interchange Format (LDIF)
Directory Service Markup Language (DSML)
Running an LDAP Server in the build life-cycle
The following POM fragment uses the run goal to launch an embedded LDAP directory server prior to the execution of the integration tests and then uses the stop goal to shutdown the embedded LDAP directory server upon completion of the integration tests.
Connecting in Java
The following LDAP client libraries can be used to connect to the embedded LDAP server:
The 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 at the following coordinates: