<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>chat-application</artifactId>
    <groupId>org.exoplatform.addons.chat</groupId>
    <version>7.1.2-RC01</version>
  </parent>
  <artifactId>application</artifactId>
  <packaging>war</packaging>
  <name>eXo Add-on:: Chat Application</name>

  <dependencies>
    <dependency>
      <groupId>io.meeds.portal</groupId>
      <artifactId>portal.component.api</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>chat</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>less-copy-resources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/src/main/webapp/css</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/webapp/css</directory>
                </resource>
              </resources>
              <overwrite>true</overwrite>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>platform-ui-src</id>
            <phase>initialize</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <includeArtifactIds>platform-ui-skin</includeArtifactIds>
              <outputDirectory>${project.build.directory}/src/main/webapp</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.lesscss</groupId>
        <artifactId>lesscss-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>chat</id>
            <configuration>
              <sourceDirectory>${project.build.directory}/src/main/webapp/css</sourceDirectory>
              <outputDirectory>${project.build.directory}/${project.build.finalName}/css</outputDirectory>
              <compress>false</compress>
              <includes>
                <include>main.less</include>
              </includes>
            </configuration>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <packagingExcludes>**/*.less,**/less/**,**/*.vue,css/lib/*,vue-app/**,js/mock/**/*,**-dev.*</packagingExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
