<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 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

 http://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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache.sling</groupId>
    <artifactId>sling</artifactId>
    <version>41</version>
    <relativePath />
  </parent>

  <artifactId>org.apache.sling.feature.cpconverter</artifactId>
  <version>1.1.2</version>

  <name>Apache Sling Content-Package to Feature Model Converter</name>
  <description>Content Package to Feature Model converter tools for Apache Sling</description>

  <properties>
    <sling.java.version>8</sling.java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <picocli.version>3.6.0</picocli.version>
    <org.apache.jackrabbit.vault.version>3.4.10</org.apache.jackrabbit.vault.version>
    <jackrabbit-api.version>2.18.4</jackrabbit-api.version>
    <jackrabbit-spi-commons.version>2.18.4</jackrabbit-spi-commons.version>
    <mockito-core.version>3.2.0</mockito-core.version>
    <license-maven-plugin.version>1.16</license-maven-plugin.version>
    <appassembler-maven-plugin.version>2.0.0</appassembler-maven-plugin.version>
  </properties>

  <scm>
    <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git</connection>
    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git</developerConnection>
    <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-feature-cpconverter.git</url>
    <tag>org.apache.sling.feature.cpconverter-1.1.2</tag>
  </scm>

  <dependencies>
    <!--
     | Logging
    -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>provided</scope>
    </dependency>

    <!--
     | CLI
    -->
    <dependency>
      <groupId>info.picocli</groupId>
      <artifactId>picocli</artifactId>
      <version>${picocli.version}</version>
      <scope>provided</scope>
    </dependency>

    <!--
     | Content-Package
    -->
    <dependency>
      <groupId>org.apache.jackrabbit.vault</groupId>
      <artifactId>org.apache.jackrabbit.vault</artifactId>
      <version>${org.apache.jackrabbit.vault.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.jackrabbit</groupId>
      <artifactId>jackrabbit-spi-commons</artifactId>
      <version>${jackrabbit-spi-commons.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.jcr</groupId>
      <artifactId>jcr</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.8.0</version>
      <scope>provided</scope>
    </dependency>

    <!--
     | Sling Feature Model libraries
    -->
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.feature</artifactId>
      <version>1.2.22</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.feature.extension.apiregions</artifactId>
      <version>1.2.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.repoinit.parser</artifactId>
      <version>1.6.8</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.converter</artifactId>
      <version>1.0.14</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.utils</artifactId>
      <version>1.11.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.util.function</artifactId>
      <version>1.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-json_1.1_spec</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.johnzon</groupId>
      <artifactId>johnzon-core</artifactId>
      <version>1.2.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.cm.json</artifactId>
      <version>1.0.6</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.annotation.versioning</artifactId>
      <version>1.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.framework</artifactId>
      <version>1.9.0</version>
      <scope>provided</scope>
    </dependency>

    <!--
     | Handle .config files
    -->
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.configadmin</artifactId>
      <version>1.9.16</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.jackrabbit</groupId>
      <artifactId>jackrabbit-api</artifactId>
      <version>${jackrabbit-api.version}</version>
      <scope>provided</scope>
    </dependency>
    <!-- 
     | Sling-Initial-Content
     -->
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.jcr.contentloader</artifactId>
      <version>2.4.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.commons.osgi</artifactId>
      <version>2.3.0</version>
      <scope>provided</scope>
     </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.contentparser.api</artifactId>
      <version>2.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.sling</groupId>
      <artifactId>org.apache.sling.contentparser.json</artifactId>
      <version>2.0.0</version>
      <scope>provided</scope>
    </dependency>
    <!--
     | Test only dependencies
    -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito-core.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
          <configuration>
          <excludes>
            <exclude>src/main/resources/META-INF/services/org.apache.sling.feature.cpconverter.handlers.EntryHandler</exclude>
            <exclude>src/main/legal/NOTICE-with-deps</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>${license-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>add-third-party</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>add-third-party</goal>
            </goals>
            <configuration>
              <fileTemplate>${basedir}/src/main/legal/LICENSE-with-deps</fileTemplate>
              <thirdPartyFilename>LICENSE-with-deps</thirdPartyFilename>
              <sortArtifactByName>true</sortArtifactByName>
              <excludedScopes>test</excludedScopes>
              <licenseMerges>
                <licenseMerge>The Apache Software License, Version 2.0|Apache License, Version 2.0|Apache Public License 2.0</licenseMerge>
              </licenseMerges>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>appassembler-maven-plugin</artifactId>
        <version>${appassembler-maven-plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>assemble</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <repositoryLayout>flat</repositoryLayout>
          <repositoryName>lib</repositoryName>
          <useWildcardClassPath>true</useWildcardClassPath>
          <extraJvmArguments>-Dproject.artifactId=${project.artifactId} -Dproject.version=${project.version} -Dbuild.timestamp=${maven.build.timestamp} -Duser.timezone=UTC -Dfile.encoding=UTF-8</extraJvmArguments>
          <defaultJvmSettings>-Xms500m -Xmx500m -XX:PermSize=128m -XX:-UseGCOverheadLimit</defaultJvmSettings>
          <licenseHeaderFile>${basedir}/src/main/legal/license-header</licenseHeaderFile>
          <programs>
            <program>
              <mainClass>org.apache.sling.feature.cpconverter.cli.ContentPackage2FeatureModelConverterLauncher</mainClass>
              <id>cp2fm</id>
            </program>
          </programs>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <finalName>${project.build.finalName}</finalName>
              <tarLongFileMode>gnu</tarLongFileMode>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptors>
                <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
