<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>nl.vpro.poms</groupId>
    <artifactId>poms-shared-parent</artifactId>
    <version>7.2.3</version>
  </parent>
  <groupId>nl.vpro.media</groupId>
  <artifactId>media-domain</artifactId>
  <version>7.2.3</version>
  <name>media-domain</name>
  <description>The basic domain classes for 'media', the core of POMS. Also, the 'update' XML bindings for it.
    It also contains some closely related domain classes like the enum to contain NICAM kijkwijzer settings.</description>
  <licenses>
    <license>
      <name>GPLv3</name>
      <url>https://www.gnu.org/licenses/gpl-3.0.txt</url>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>nl.vpro.image</groupId>
      <artifactId>image-domain</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.meeuw.util</groupId>
      <artifactId>mihxil-functional</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-jackson2</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.user</groupId>
      <artifactId>user-domain</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.media</groupId>
      <artifactId>media-classification</artifactId>
    </dependency>
    <dependency>
      <groupId>org.meeuw.i18n</groupId>
      <artifactId>i18n-regions-countries</artifactId>
    </dependency>
    <dependency>
      <groupId>org.meeuw.i18n</groupId>
      <artifactId>i18n-regions-subdivisions</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.validation</groupId>
      <artifactId>jakarta.validation-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-jaxb-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>jakarta.persistence</groupId>
      <artifactId>jakarta.persistence-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-persistence</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-matchers</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>jakarta.el</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-test</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.meeuw</groupId>
      <artifactId>jaxb-documentation</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-annotations</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.bsc.maven</groupId>
        <artifactId>maven-processor-plugin</artifactId>
        <executions>
          <execution>
            <id>process</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <processors>
                <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor,lombok.launch.AnnotationProcessorHider$AnnotationProcessor</processor>
              </processors>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-jpamodelgen</artifactId>
            <version>${hibernate.version}</version>
          </dependency>
          <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${hibernate.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/apt</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>node</directory>
            </fileset>
            <fileset>
              <directory>node_modules</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>npm</id>
      <activation>
        <property>
          <name>skipTests</name>
          <value>!true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-maven-plugin</artifactId>
            <version>1.12.0</version>
            <executions>
              <execution>
                <id>install node</id>
                <goals>
                  <goal>install-node-and-npm</goal>
                </goals>
              </execution>
              <execution>
                <id>install dependencies</id>
                <goals>
                  <goal>npm</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <nodeVersion>v16.13.0</nodeVersion>
              <workingDirectory>${basedir}</workingDirectory>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <phase>dontexecute</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>node/npm</executable>
                  <arguments>
                    <argument>run</argument>
                    <argument>test</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
