<?xml version="1.0" encoding="UTF-8"?>

<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * 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 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<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.xwiki.platform</groupId>
    <artifactId>xwiki-platform-search-solr-server-debian</artifactId>
    <version>7.0</version>
  </parent>
  <artifactId>xwiki-platform-search-solr-server-debian-data</artifactId>
  <packaging>deb</packaging>
  <name>XWiki Platform - Search - SOLR - Server - Debian - Data</name>
  <description>XWiki SOLR server data package</description>
  <properties>
    <data.path>${project.build.directory}/data</data.path>

    <debian.solr.description>
 XWiki is a free wiki software platform written in Java with a design emphasis
 on extensibility.
 .
 This package contains configuration files to use in a SOLR server synchronized with XWiki version.
    </debian.solr.description>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-search-solr-server-data</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- Unpack the data -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
            <execution>
              <id>unzip-application</id>
              <phase>process-resources</phase>
              <goals>
                <goal>unpack</goal>
              </goals>
              <configuration>
                <artifactItems>
                  <artifactItem>
                    <groupId>org.xwiki.platform</groupId>
                    <artifactId>xwiki-platform-search-solr-server-data</artifactId>
                    <version>${project.version}</version>
                    <type>jar</type>
                  </artifactItem>
                </artifactItems>
                <outputDirectory>${data.path}</outputDirectory>
              </configuration>
            </execution>
          </executions>
      </plugin>
      <!-- Prepare configuration -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
      <!-- Produce deb package -->
      <plugin>
        <artifactId>jdeb</artifactId>
        <groupId>org.vafer</groupId>
        <configuration>
          <dataSet>
            <data>
              <src>${data.path}</src>
              <type>directory</type>
              <mapper>
                <type>perm</type>
                <prefix>/usr/lib/xwiki-solr</prefix>
              </mapper>
            </data>
          </dataSet>
        </configuration>
      </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
