<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
  
  https://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.directory.api</groupId>
    <artifactId>api-ldap-codec-parent</artifactId>
    <version>2.1.2</version>
  </parent>
  
  <artifactId>api-ldap-codec-standalone</artifactId>
  <name>Apache Directory LDAP API Codec Standalone</name>
  <packaging>jar</packaging>
  <description>
    This module was created to fix issue DIRSHARED-91 where the embedded Felix
    instance inside the default LdapCodecService implementation was making it 
    very problematic to deploy the ldap-codec inside an RCP (OSGi) environment
    and hence Apache Directory Studio could not use it.

    This module is most likely temporary and will disappear once we are fully
    OSGi enabled. This module is a plain old jar, not a bundle to avoid 
    accidental reuse as an OSGi module because it contains the version of the
    LdapCodecService that embeds Felix to make controls and extended ops 
    pluggable in the codec.
  </description>

  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>api-ldap-net-mina</artifactId>
    </dependency>
    
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>api-ldap-codec-core</artifactId>
    </dependency>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>api-ldap-extras-codec</artifactId>
    </dependency> 

    <dependency>
      <groupId>org.apache.mina</groupId>
      <artifactId>mina-core</artifactId>
    </dependency>
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <supportedProjectTypes>
            <supportedProjectType>jar</supportedProjectType>
          </supportedProjectTypes>
          <instructions>
            <Export-Package>*</Export-Package>
            <Automatic-Module-Name>apache.directory.ldap.api.extras.codec.standalone</Automatic-Module-Name>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>
                      maven-bundle-plugin
                    </artifactId>
                    <versionRange>
                      [2.5.3,)
                    </versionRange>
                    <goals>
                      <goal>manifest</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  
</project>
