<?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>

    <groupId>de.atb-bremen</groupId>
    <artifactId>jenabean-parent</artifactId>
    <version>2.0.0</version>

    <packaging>pom</packaging>
    <name>Jenabean</name>
    <inceptionYear>2015</inceptionYear>
    <url>https://github.com/ATB-Bremen/jenabean</url>
    <description>Jenabean is an annotation based library to bind java beans to RDF/OWL.</description>

    <organization>
        <name>ATB – Institut für angewandte Systemtechnik Bremen GmbH</name>
        <url>https://www.atb-bremen.de</url>
    </organization>

    <developers>
        <developer>
            <id>schlotze</id>
            <name>Sebastian Scholze</name>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/ATB-Bremen/jenabean</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.version>3.5.4</maven.version>
        <java.version>11</java.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>enforce-versions</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <!--require Maven >= 3.5.4-->
                                        <version>${maven.version}</version>
                                    </requireMavenVersion>
                                    <requireJavaVersion>
                                        <!--require Java >= ${java.version}-->
                                        <version>${java.version}</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.0.0</version>
                    <configuration>
                        <!--license to use for the project-->
                        <licenseName>apache_v2</licenseName>

                        <licenseFile>${basedir}/LICENSE</licenseFile>

                        <!--generate license file even if it exists-->
                        <force>true</force>

                        <!--specifies the folders to consider for header replacement-->
                        <roots>
                            <root>src/main/java</root>
                            <root>src/main/resources</root>
                        </roots>

                        <extraExtensions>
                            <yml>properties</yml>
                            <yaml>properties</yaml>
                        </extraExtensions>

                        <excludes>
                            <!--do not add license header to json files because json standard does not allow comments-->
                            <exclude>**/*.json</exclude>
                        </excludes>

                        <!--exclude test-scoped dependencies from the 3rd party license-list-->
                        <excludedScopes>test</excludedScopes>

                        <!--suppress the "No file to scan" warning-->
                        <ignoreNoFileToScan>true</ignoreNoFileToScan>

                        <!--automatically update the project name or description-->
                        <canUpdateDescription>true</canUpdateDescription>

                        <!--whether the missing file should be used-->
                        <useMissingFile>true</useMissingFile>
                    </configuration>
                    <executions>
                        <execution>
                            <id>license-management</id>
                            <phase>process-resources</phase>
                            <goals>
                                <!--updates the source's headers according to the specified license-->
                                <goal>update-file-header</goal>

                                <!--Adds the full-blown license file to the final product-->
                                <goal>update-project-license</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.9.0</version>
                    <configuration>
                        <release>${java.version}</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.2</version>
                    <configuration>
                        <sourceDirectory>src/main</sourceDirectory>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.2.0</version>
                    <executions>
                        <execution>
                            <id>copy-dependencies</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/lib</outputDirectory>
                                <overWriteReleases>false</overWriteReleases>
                                <overWriteSnapshots>false</overWriteSnapshots>
                                <overWriteIfNewer>true</overWriteIfNewer>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M5</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <keyname>BCC0CA99</keyname>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <!--test-->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <modules>
        <module>jenabean</module>
    </modules>

</project>

