<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2012-2021 DuyHai DOAN
  ~
  ~ 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>achilles</artifactId>
        <groupId>info.archinnov</groupId>
        <version>6.1.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>achilles-junit</artifactId>
    <name>Achilles JUnit</name>
    <description>Achilles JUnit Support</description>
    <packaging>jar</packaging>

    <dependencies>

        <dependency>
            <groupId>info.archinnov</groupId>
            <artifactId>achilles-embedded</artifactId>
        </dependency>

        <dependency>
            <groupId>info.archinnov</groupId>
            <artifactId>achilles-core</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <!--<plugin>-->
                <!--<groupId>org.bsc.maven</groupId>-->
                <!--<artifactId>maven-processor-plugin</artifactId>-->
                <!--<version>2.2.4</version>-->
                <!--<executions>-->
                    <!--<execution>-->
                        <!--<id>process</id>-->
                        <!--<goals>-->
                            <!--<goal>process</goal>-->
                        <!--</goals>-->
                        <!--<phase>generate-sources</phase>-->
                    <!--</execution>-->
                <!--</executions>-->
            <!--</plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <!--Disables annotation processing, otherwise compiler will look for the Processor declared in the-->
                    <!--META-INF/services/javax.annotation.processing.Processor file and compilation will fail-->
                    <!--Unfortunately the compiler error is swallowed by the maven-compiler-plugin and maven compilation-->
                    <!--succeeds even though 0 .class files are being generated-->
                    <proc>none</proc>
                    <debug>true</debug>
                    <compilerArgument>-proc:none</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-source-files-to-classpath</id>
                        <!-- here the phase you need -->
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/test-classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/test/java</directory>
                                    <includes>
                                        <include>**/TestEntity*.java</include>
                                        <include>**/TestUDT*.java</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
