<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright (c) Codice Foundation
 *
 * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or any later version. 
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed along with this program and can be found at
 * <http://www.gnu.org/licenses/lgpl.html>.
 *
 **/
-->
<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>distribution</artifactId>
    <groupId>ddf</groupId>
        <version>2.26.46</version>
  </parent>
  <!--
Provides the common/shared resources used by the DDF core, standard, and enterprise distributions.

These shared resources are packaged into a JAR file that is installed in the maven repo and then the
other DDF distributions have it as a dependency that they copy and unpack into their target directory
using the maven-dependency-plugin.

These shared resources include:
    - DDF startup scripts for Windows and Unix (in resources/bin)
    - Customized Karaf .cfg and .properties files (in resources/etc)
    - DDF default site security configuration file (in resources/etc/ddf)
    - Security keystores (in resources/etc/keystores)
    - Third party license files as PDFs and txt files (in resources/licenses)
    - Template .cfg files to create sources/providers (in resources/templates)
    - txt files for Copyright, Export Control, and Software Usage Agreement (in resources)
    - Common maven assembly descriptor common-bin.xml used by all DDF distributions for their
      assembly using the maven-assemply-plugin and <componentDescriptors> to inject it (in resources)
-->
  <artifactId>ddf-common</artifactId>
  <groupId>org.codice.ddf</groupId>
  <name>DDF :: Distribution :: DDF Common</name>
  <packaging>jar</packaging>
  <properties>
    <command.prompt.title>DDF-${project.version}</command.prompt.title>
  </properties>
  <dependencies>
    <dependency>
      <groupId>ddf.platform.osgi</groupId>
      <artifactId>platform-osgi-internal-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>ddf.platform.osgi</groupId>
      <artifactId>platform-osgi-configadmin</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.scr</artifactId>
      <version>${felix.scr.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.crypto.tink</groupId>
      <artifactId>tink</artifactId>
      <version>${tink.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <version>${protobuf.version}</version>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>${org.json.version}</version>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources-filtered</directory>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>check-artifact-size</id>
            <phase>verify</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <ArtifactSizeEnforcerRule implementation="org.codice.maven.artifactsize.ArtifactSizeEnforcerRule">
                  <maxArtifactSize>15.8_MB</maxArtifactSize>
                </ArtifactSizeEnforcerRule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!--
Generates the resources from the /resources sub-directory into a JAR file and copies
it into the maven repo so other DDF distribution projects can access it.
-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <includeEmptyDirs>true</includeEmptyDirs>
          <escapeString>_DO_NOT_EXPAND_</escapeString>
        </configuration>
        <executions>
          <execution>
            <id>filter</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
