<?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 - OWL2Java</name>
    <artifactId>jopa-owl2java</artifactId>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>net.sf.jopt-simple</groupId>
            <artifactId>jopt-simple</artifactId>
            <version>5.0.4</version>
        </dependency>
        <dependency>
            <groupId>com.sun.codemodel</groupId>
            <artifactId>codemodel</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>owlapi-api</artifactId>
            <version>${net.sourceforge.owlapi.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>owlapi-apibinding</artifactId>
            <version>${net.sourceforge.owlapi.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>owlapi-impl</artifactId>
            <version>${net.sourceforge.owlapi.version}</version>
        </dependency>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>jopa-api</artifactId>
            <version>${project.parent.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>jopa-owlapi-utils</artifactId>
            <version>${project.parent.version}</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${ch.qos.logback.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Inserts application version into constants -->
                    <plugin>
                        <groupId>com.google.code.maven-replacer-plugin</groupId>
                        <artifactId>replacer</artifactId>
                        <version>1.5.3</version>
                        <executions>
                            <execution>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>replace</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <ignoreMissingFile>false</ignoreMissingFile>
                            <file>${project.basedir}/src/main/java/cz/cvut/kbss/jopa/owl2java/Constants.java</file>
                            <regex>false</regex>
                            <token>$VERSION$</token>
                            <value>${project.parent.version}</value>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <resources>
            <resource>
                <directory>src/main/sh</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>cz.cvut.kbss.jopa.owl2java.OWL2Java</mainClass>
                            <addClasspath>true</addClasspath>
                        </manifest>
                    </archive>
                    <excludes>
                        <exclude>
                            owl2java.sh
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
