<?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>
    <groupId>com.almis.awe</groupId>
    <artifactId>awe-dependencies</artifactId>
    <version>4.11.11</version>
    <relativePath>../awe-dependencies</relativePath>
  </parent>

  <packaging>jar</packaging>
  <artifactId>awe-client-angular</artifactId>
  <name>AWE Client Angular (V${project.version})</name>
  <description>Awe Client Angular Module</description>
  <url>http://webjars.org</url>

  <properties>
    <jetspeed.version>2.3.1</jetspeed.version>
    <!-- Sonar properties -->
    <application.folder>.</application.folder>
    <sonar.sources>src/main/resources/js/awe</sonar.sources>
    <sonar.tests>src/test/js</sonar.tests>
    <sonar.inclusions>src/main/resources/js/awe/**,src/main/resources/less/awe/**</sonar.inclusions>
    <sonar.testExecutionReportPaths>target/reports/karma/junit/javascriptUnitTests.xml</sonar.testExecutionReportPaths>
    <sonar.javascript.lcov.reportPaths>target/reports/karma/coverage/lcov.info</sonar.javascript.lcov.reportPaths>
    <performancetest.host>localhost</performancetest.host>
    <performancetest.port>18080</performancetest.port>
    <performancetest.path/>
    <!-- Maven build timestamp -->
    <awe.build.timestamp>${project.version}-${maven.build.timestamp}</awe.build.timestamp>
    <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
    <nodePackageSkipDevDependencies>true</nodePackageSkipDevDependencies>
  </properties>

  <build>
    <finalName>awe-client-angular</finalName>
    <resources>
      <resource>
        <directory>${project.basedir}/src/main/resources/images</directory>
        <targetPath>${project.build.directory}/classes/images</targetPath>
      </resource>
      <resource>
        <directory>${project.basedir}/src/main/resources/less</directory>
        <includes>
          <include>awe/variables.less</include>
          <include>awe/mixins.less</include>
        </includes>
        <targetPath>${project.build.directory}/classes/less</targetPath>
      </resource>
      <resource>
        <directory>${project.basedir}/src/main/resources/css</directory>
        <targetPath>${project.build.directory}/classes/static/css</targetPath>
      </resource>
      <resource>
        <directory>${project.basedir}/src/main/resources/templates</directory>
        <targetPath>${project.build.directory}/classes/templates</targetPath>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>${project.basedir}/src/main/resources</directory>
        <targetPath>${project.build.directory}/classes/templates</targetPath>
        <includes>
          <include>index.html</include>
       </includes>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <!-- Frontend generation -->
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>karma</id>
            <goals>
              <goal>karma</goal>
            </goals>
            <phase>test</phase>
            <configuration>
              <environmentVariables>
                <launch.edge>${karma.launch.edge}</launch.edge>
                <launch.gitlab>${karma.launch.gitlab}</launch.gitlab>
              </environmentVariables>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
