<?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>cz.cvut.kbss.jopa</groupId>
        <artifactId>jopa-all</artifactId>
        <version>0.22.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <name>JOPA - implementation</name>
    <artifactId>jopa-impl</artifactId>
    <packaging>jar</packaging>

    <properties>
        <org.antlr4.version>4.9.3</org.antlr4.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>jopa-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>ontodriver-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>datatype</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${org.aspectj.version}</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${org.aspectj.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.jgrapht</groupId>
            <artifactId>jgrapht-core</artifactId>
            <version>1.1.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>${org.antlr4.version}</version>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-maven-plugin</artifactId>
                <version>${org.antlr4.version}</version>
                <executions>
                    <execution>
                        <id>antlr</id>
                        <goals>
                            <goal>antlr4</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>dev.aspectj</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <configuration combine.self="override">
                    <complianceLevel>${jdk.version}</complianceLevel>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <sources>
                        <source>
                            <basedir>${basedir}/src/main/java</basedir>
                            <includes>
                                <include>**/BeanListenerAspect.java</include>
                            </includes>
                        </source>
                    </sources>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>${org.aspectj.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>compile</goal>
                            <!-- use this goal to weave all your main classes -->
                        </goals>
                    </execution>
                    <execution>
                        <!-- Split into two executions to ensure AJC runs AFTER regular compile in tests as well -->
                        <id>test-compile</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <!-- use this goal to weave all test classes -->
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${project.basedir}/src/test/resources/entity-loader-test-jar.jar
                        </additionalClasspathElement>
                    </additionalClasspathElements>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
