<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>eu.openanalytics.phaedra</groupId>
    <artifactId>phaedra2-commons</artifactId>
    <version>2.12.0-SNAPSHOT</version>
    <name>phaedra2-commons</name>

    <properties>
        <java.version>21</java.version>
        <gitflow-maven.version>1.21.0</gitflow-maven.version>
    </properties>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.3.1</version>
        <relativePath/>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-oauth2-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-graphql</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.graphql</groupId>
            <artifactId>spring-graphql-test</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>oa-gitea-fmichielssen</id>
	    <url>https://scm.openanalytics.eu/api/packages/fmichielssen/maven</url>
        </snapshotRepository>
        <repository>
            <id>oa-nexus-releases</id>
            <name>OpenAnalytics Release Repository</name>
            <url>https://nexus.openanalytics.eu/repository/releases</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <configuration>
                    <header>LICENSE_HEADER</header>
                    <aggregate>true</aggregate>
                    <strictCheck>true</strictCheck>
                    <excludes>
                        <exclude>**/*.log</exclude>
                        <exclude>**/*.properties</exclude>
                        <exclude>**/*.yml</exclude>
                        <exclude>**/*.yaml</exclude>
                        <exclude>**/*.config</exclude>
                        <exclude>**/*.xml</exclude>
                        <exclude>**/*.json</exclude>
                        <exclude>**/*.sql</exclude>
                        <exclude>**/*.sh</exclude>
                        <exclude>LICENSE</exclude>
                        <exclude>LICENSE_HEADER</exclude>
                        <exclude>README.md</exclude>
                        <exclude>.gitignore</exclude>
                        <exclude>Dockerfile</exclude>
                        <exclude>Dockerfile.app</exclude>
                        <exclude>Dockerfile.db</exclude>
                        <exclude>Jenkinsfile</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-copyright-headers</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                    <execution>
                    	<id>check-copyright-headers</id>
                    	<phase>package</phase>
                    	<goals>
                    		<goal>check</goal>
                    	</goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.amashchenko.maven.plugin</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
                <version>${gitflow-maven.version}</version>
            </plugin>
        </plugins>
    </build>
</project>
