<?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>

    <prerequisites>
        <maven>3.3.1</maven>
    </prerequisites>

    <groupId>org.scientificcms</groupId>
    <artifactId>scientificcms-parent</artifactId>
    <version>7.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>ScientificCMS</name>
    <url>https://www.scientificcms.org</url>
    <distributionManagement>
        <site>
            <id>scientificcms-site</id>
            <name>ScientificCMS</name>
            <url>https://www.scientificcms.org/project-sites/</url>
        </site>
           <!-- <snapshotRepository>
            <id>libreccm-snapshots</id>
            <url>https://packages.libreccm.org/repository/maven-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>libreccm-releases</id>
            <url>https://packages.libreccm.org/repository/maven-releases/</url>
        </repository> -->
        <snapshotRepository>
            <id>libreccm-snapshots</id>
            <url>https://git.libreccm.org/api/packages/libreccm/maven</url>
        </snapshotRepository>
        <repository>
            <id>libreccm-releases</id>
            <url>https://git.libreccm.org/api/packages/libreccm/maven</url>
        </repository>
    </distributionManagement>

    <organization>
        <name>LibreCCM Foundation</name>
    </organization>

    <licenses>
        <license>
            <name>LGPLv2 or newer</name>
            <url>http://www.gnu.org/licenses/lgpl-2.0.html</url>
        </license>
    </licenses>
    
<!--    <scm>
        <developerConnection>scm:svn:https://svn.libreccm.org/ccm/ccm_ng</developerConnection>
    </scm>-->

    <repositories>
        <repository>
            <releases>
                <enabled>false</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
            </snapshots>
            <name>LibreCCM Snapshots</name>
            <id>libreccm-snapshots</id>
            <url>https://packages.libreccm.org/repository/maven-snapshots/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <modules>
        <module>sci-types-department</module>
        <module>sci-types-project</module>
        <module>scientificcms</module>
        <module>sci-publications</module>
        
        <module>scicms-bundle-devel</module>
        <module>scicms-bundle-devel-wildfly</module>
    </modules>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <!--                <version>2.9</version>-->
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>summary</report>
                            <report>licenses</report>
                            <report>scm</report>
                            <report>dependency-management</report>
                            <report>plugin-management</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <!--<version>2.4</version>-->
                <configuration>
                    <rulesUri>file:///${session.executionRootDirectory}/maven-version-rules.xml</rulesUri>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependency-updates-report</report>
                            <report>plugin-updates-report</report>
                            <report>property-updates-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
    
    <build>
        <pluginManagement>
            <plugins>
                
                <!-- 
                    Offical Maven plugins (in alphabetic order) 
                -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>11</source>
                        <target>11</target>
                        <optimize>true</optimize>
                        <debug>true</debug>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.13.0</version>
                    <configuration>
                        <linkXref>true</linkXref>
                        <sourceEncoding>utf-8</sourceEncoding>
                        <targetJdk>11</targetJdk>
                        <!--                        <rulesets>
                            <ruleset>/rulesets/basic.xml</ruleset>
                            <ruleset>/rulesets/braces.xml</ruleset>
                            <ruleset>/rulesets/codesize.xml</ruleset>
                            <ruleset>/rulesets/clone.xml</ruleset>
                            <ruleset>/rulesets/coupling.xml</ruleset>
                            <ruleset>/rulesets/design.xml</ruleset>
                            <ruleset>/rulesets/finalizers.xml</ruleset>
                            <ruleset>/rulesets/imports.xml</ruleset>
                            <ruleset>/rulesets/javabeans.xml</ruleset>
                            <ruleset>/rulesets/junit.xml</ruleset>
                            <ruleset>/rulesets/naming.xml</ruleset>
                            <ruleset>/rulesets/optimizations.xml</ruleset>
                            <ruleset>/rulesets/strictexception.xml</ruleset>
                            <ruleset>/rulesets/strings.xml</ruleset>
                            <ruleset>/rulesets/sunsecure.xml</ruleset>
                            <ruleset>/rulesets/unusedcode.xml</ruleset>
                        </rulesets>-->
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>pmd</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0-M5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.9.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                
                <!--
                    Order plugins in alphabetic order (groupId, artifactId)
                -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>1.12.1</version>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>4.0.0</version>
                    <configuration>
                        <findbugsXmlOutput>true</findbugsXmlOutput>
                        <xmlOutput>true</xmlOutput>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>findbugs</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>de.jpdigital</groupId>
                    <artifactId>hibernate53-ddl-maven-plugin</artifactId>
                    <version>2.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>taglist-maven-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.5</version>
                </plugin>
                <plugin>
                    <groupId>org.wildfly.plugins</groupId>
                    <artifactId>wildfly-maven-plugin</artifactId>
                    <version>2.1.0.Beta1</version>
                    <configuration>
                        <skip>true</skip>
                        <version>24.0.1.Final</version>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.wildfly.plugins</groupId>
                    <artifactId>wildfly-jar-maven-plugin</artifactId>
                    <version>3.0.2.Final</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>1.8.0</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>3.3.1</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <configuration>
                    <rulesUri>file:///${session.executionRootDirectory}/maven-version-rules.xml</rulesUri>
                </configuration>
            </plugin>
            
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagBase>https://svn.libreccm.org/ccm/ccm_ng-releases</tagBase>
                </configuration>
            </plugin>-->
        </plugins>
    </build>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.libreccm</groupId>
                <artifactId>libreccm-parent</artifactId>
                <version>7.0.0-SNAPSHOT</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>