ldap-maven-plugin/src/main/java/com/btmatthews/maven/plugins/ldap/mojo/IncludeServerDependenciesComponentConfigurator.java
@Override
    public void configureComponent(final Object component,
                                   final PlexusConfiguration configuration,
                                   final ExpressionEvaluator expressionEvaluator,
                                   final ClassRealm containerRealm,
                                   final ConfigurationListener listener)
            throws ComponentConfigurationException {

        final String serverType = getServerType(configuration);

        if (!serverType.startsWith("dependency-")) {
            addServerDependenciesToClassRealm(serverType, expressionEvaluator, containerRealm);
        }

        converterLookup.registerConverter(new ClassRealmConverter(containerRealm));

        final ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();

        converter.processConfiguration(converterLookup, component, containerRealm, configuration,
                expressionEvaluator, listener);
    }
@Override
    public void configureComponent(final Object component,
                                   final PlexusConfiguration configuration,
                                   final ExpressionEvaluator expressionEvaluator,
                                   final ClassRealm containerRealm,
                                   final ConfigurationListener listener)
            throws ComponentConfigurationException {

        final String serverType = getServerType(configuration);

        if (!serverType.startsWith("dependency-")) {
            addServerDependenciesToClassRealm(serverType, expressionEvaluator, containerRealm);
        }

        converterLookup.registerConverter(new ClassRealmConverter(containerRealm));

        final ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter();

        converter.processConfiguration(converterLookup, component, containerRealm, configuration,
                expressionEvaluator, listener);
    }
Configure the Mojo by adding the dependencies for the LDAP server type to the class loader.

@param component           The Mojo being configured.
@param configuration       The plugin configuration.
@param expressionEvaluator Used to evaluate expressions.
@param containerRealm      Used to build the class loader.
@param listener            Receives notification when configuration is changed.
@throws ComponentConfigurationException If there was a problem resolving or locating any of the dependencies.