<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>


  <parent>
    <groupId>nl.vpro.poms</groupId>
    <artifactId>poms-shared-parent</artifactId>
    <version>5.10.1</version>
  </parent>

  <groupId>nl.vpro.media</groupId>
  <artifactId>media-domain</artifactId>
  <name>media-domain</name>

  <build>
    <plugins>
      <plugin>
        <!-- see https://intellij-support.jetbrains.com/hc/en-us/community/posts/206842215-Hibernate-JPA-2-Metamodel-generation -->
        <!--  "Store generated sources relative to:" select Module content root." -->
        <groupId>org.bsc.maven</groupId>
        <artifactId>maven-processor-plugin</artifactId>
        <executions>
          <execution>
            <id>process</id>
            <goals>
              <goal>process</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <processors>
                <!-- https://stackoverflow.com/questions/31805327/how-to-cohexist-lombok-and-jpametalmodel-processors-with-maven -->
                <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>
        </dependencies>
      </plugin>
      <!-- dit helpt blijkbaar eclipse om te begrijpen dat generated-sources/apt ook een source dir is? -->
      <!-- https://stackoverflow.com/questions/10735380/define-additional-source-directory-in-maven ? -->
      <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>
    </plugins>
  </build>

  <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>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.user</groupId>
      <artifactId>user-test</artifactId>
    </dependency>
    <dependency>
      <groupId>nl.vpro.media</groupId>
      <artifactId>media-classification</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>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.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.1-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
    </dependency>-->
    <dependency>
      <groupId>org.hibernate.validator</groupId>
      <artifactId>hibernate-validator</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- TODO: This dependency needs to be dropped -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
    </dependency>

    <dependency>
      <!-- contains javax.persistence -->
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>com.sun.mail</groupId>
          <artifactId>javax.mail</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-persistence</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</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>nl.vpro.poms</groupId>
      <artifactId>poms-shared-test</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <classifier>jdk15</classifier>
      <scope>test</scope>
    </dependency>
    <!-- This is needed to let hibernate validation work, it somewhy needs an el-implementation -->
    <dependency>
      <groupId>org.glassfish.web</groupId>
      <artifactId>javax.el</artifactId>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>nl.vpro.shared</groupId>
      <artifactId>vpro-shared-test</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
    </dependency>
    <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjweaver</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</project>
