<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2022 Red Hat, Inc. and/or its affiliates.
  ~
  ~ Licensed 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.quarkiverse.dashbuilder</groupId>
    <artifactId>quarkus-dashbuilder-parent</artifactId>
    <version>0.30.0</version>
  </parent>
  <artifactId>quarkus-dashbuilder-ui</artifactId>
  <name>Dashbuilder Quarkus Extension - UI</name>
  <description>Dashbuilder extension Web Bundle</description>

  <build>
    <plugins>
      <plugin>
        <groupId>org.orienteer.jnpm</groupId>
        <artifactId>jnpm-maven-plugin</artifactId>
        <version>${version.org.orienteer.jnpm}</version>
        <executions>
          <execution>
            <goals>
              <goal>install</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/dashbuilder</outputDirectory>
              <strategy>SIMPLE</strategy>
              <packages>
                <package>${dashbuilder.package}@~${version.dashbuilder.npm}</package>
              </packages>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/dashbuilder/${dashbuilder.package}/dist/</outputDirectory>
              <resources>
                <resource>
                  <directory>src/samples</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>