<?xml version="1.0" encoding="UTF-8"?>
<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>integ</artifactId>
    <groupId>org.exoplatform.integration</groupId>
    <version>5.3.2-RC02</version>
  </parent>
  <artifactId>integ-search-portlet</artifactId>
  <!-- we don't put war due to juzu packaging with assembly -->
  <packaging>jar</packaging>
  <name>eXo PLF:: Integration - Search - Portlet</name>
  <description>Integration search portlet</description>
  <dependencies>
    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-plugins-less</artifactId>
    </dependency>
    <dependency>
      <groupId>org.juzu</groupId>
      <artifactId>juzu-plugins-portlet</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.portlet</groupId>
      <artifactId>portlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.commons</groupId>
      <artifactId>commons-api</artifactId>
    </dependency>
    <!-- We want to be sure to use the right version in the dependency plugin but it's not required in the package -->
    <dependency>
      <groupId>org.exoplatform.platform-ui</groupId>
      <artifactId>platform-ui-skin</artifactId>
      <type>war</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>integ-search-service</artifactId>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <finalName>unified-search</finalName>
    <plugins>
    <!--
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/src/main/webapp</directory>
                  <includes>
                    <include>skin/less/**</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.exoplatform.platform-ui</groupId>
                  <artifactId>platform-ui-skin</artifactId>
                  <type>war</type>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
                  <includes>skin/less/mixins.less,skin/less/variables.less</includes>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.lesscss</groupId>
        <artifactId>lesscss-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>administration</id>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <sourceDirectory>${project.build.directory}/${project.build.finalName}/skin/less</sourceDirectory>
              <outputDirectory>${project.build.directory}/${project.build.finalName}/skin/css</outputDirectory>
              <excludes>
                <exclude>mixins.less</exclude>
                <exclude>variables.less</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      -->
      <plugin>
        <groupId>org.codehaus.gmaven</groupId>
        <artifactId>gmaven-plugin</artifactId>
        <configuration>
          <sources>
            <fileset>
              <directory>${project.build.outputDirectory}</directory>
              <includes>
                <include>**/*.groovy</include>
              </includes>
            </fileset>
          </sources>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptorRefs>
                <descriptorRef>platform-juzu</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.exoplatform.commons</groupId>
            <artifactId>commons-juzu</artifactId>
            <version>${org.exoplatform.commons.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <attach>true</attach>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
