<?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>cloud.piranha</groupId>
    <artifactId>project</artifactId>
    <version>20.1.2</version>
    <packaging>pom</packaging>

    <name>Piranha Project</name>
    <description>
        The Piranha Project delivers you with a variety of cloud containers
        and several useful add-on modules
    </description>
    <url>https://github.com/piranhacloud/piranha</url>
    <licenses>
        <license>
            <name>Piranha License</name>
            <url>https://github.com/piranhacloud/piranha/blob/master/LICENSE</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>mriem</id>
            <name>Manfred Riem</name>
            <email>mriem@manorrock.com</email>
            <organization>Manorrock.com</organization>
        </developer>
        <developer>
            <id>atijms</id>
            <name>Arjan Tijms</name>
        </developer>
    </developers>

    <modules>
        <!-- Core -->
        <module>api</module>
        <module>piranha</module>
    
        <!-- Logical components -->
        <module>http</module>
        <module>session</module>
        <module>resource</module>
        <module>cdi</module>
        <module>servlet</module>
        <module>pages</module>
        <module>security</module>
        <module>rest</module>
        <module>faces</module>
        
        <!-- Distributions -->
        <module>nano</module>
        <module>embedded</module>
        <module>micro</module>
        <module>server</module>
        
        <!-- MicroProfile -->
        <module>microprofile</module>
        
        <!-- Connectors -->
        <module>arquillian</module>
    </modules>

    <scm>
        <connection>scm:git:git://github.com/piranhacloud/piranha.git</connection>
        <developerConnection>scm:git:git@github.com:piranhacloud/piranha.git</developerConnection>
        <url>https://github.com/piranhacloud/piranha</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Jakarta EE web-profile -->
            <dependency>
                <groupId>jakarta.platform</groupId>
                <artifactId>jakarta.jakartaee-web-api</artifactId>
                <version>8.0.0</version>
            </dependency>
            
            <!-- Hazelcast HTTP Session integration -->
            <dependency>
                <groupId>com.hazelcast</groupId>
                <artifactId>hazelcast</artifactId>
                <version>3.12.4</version>
            </dependency>
            
            <!-- HTTP / Network -->
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-all</artifactId>
                <version>4.1.43.Final</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.grizzly</groupId>
                <artifactId>grizzly-http-server</artifactId>
                <version>2.4.4</version>
            </dependency>
            
            <!-- Jakarta Servlet -->
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>4.0.3</version>
            </dependency>
            
            <!-- Jakarta Server Pages -->
            <dependency>
                <groupId>jakarta.servlet.jsp.jstl</groupId>
                <artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
                <version>1.2.7</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.web</groupId>
                <artifactId>jakarta.servlet.jsp</artifactId>
                <version>2.3.5</version>
            </dependency>
            
            <!-- Jakarta WebSocket -->
            <dependency>
                <groupId>jakarta.websocket</groupId>
                <artifactId>jakarta.websocket-api</artifactId>
                <version>1.1.2</version>
            </dependency>
            
            <!-- Jakarta REST -->
            <dependency>
                <groupId>jakarta.ws.rs</groupId>
                <artifactId>jakarta.ws.rs-api</artifactId>
                <version>2.1.6</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-servlet</artifactId>
                <version>2.30</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-servlet-core</artifactId>
                <version>2.30</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.inject</groupId>
                <artifactId>jersey-hk2</artifactId>
                <version>2.30</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.ext.cdi</groupId>
                <artifactId>jersey-cdi1x</artifactId>
                <version>2.30</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.media</groupId>
                <artifactId>jersey-media-json-processing</artifactId>
                <version>2.30</version>
            </dependency>
            
            <!-- Jakarta Faces -->
            <dependency>
                <groupId>jakarta.faces</groupId>
                <artifactId>jakarta.faces-api</artifactId>
                <version>2.3.2</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.faces</artifactId>
                <version>2.3.14</version>
            </dependency>
            <dependency>
                <groupId>org.apache.myfaces.core</groupId>
                <artifactId>myfaces-impl</artifactId>
                <version>2.3.5</version>
            </dependency>
            
            <!-- Jakarta Security -->
            <dependency>
                <groupId>jakarta.security.enterprise</groupId>
                <artifactId>jakarta.security.enterprise-api</artifactId>
                <version>1.0.2</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.soteria</groupId>
                <artifactId>jakarta.security.enterprise</artifactId>
                <version>1.0.1</version>
            </dependency>
            
            <!-- Jakarta Authentication -->
            <dependency>
                <groupId>jakarta.security.auth.message</groupId>
                <artifactId>jakarta.security.auth.message-api</artifactId>
                <version>1.1.3</version>
            </dependency>
            <dependency>
                <groupId>org.omnifaces</groupId>
                <artifactId>eleos</artifactId>
                <version>0.3.2</version>
            </dependency>
            
            <!-- Jakarta Authorization -->
            <dependency>
                <groupId>jakarta.authorization</groupId>
                <artifactId>jakarta.authorization-api</artifactId>
                <version>1.5.0</version>
            </dependency>
            <dependency>
                <groupId>org.omnifaces</groupId>
                <artifactId>exousia</artifactId>
                <version>0.4.3</version>
            </dependency>
            
            <!-- Jakarta Expression Language -->
            <dependency>
                <groupId>jakarta.el</groupId>
                <artifactId>jakarta.el-api</artifactId>
                <version>3.0.3</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.el</artifactId>
                <version>3.0.3</version>
            </dependency>
            
            <!-- Jakarta Persistence -->
            <dependency>
                <groupId>jakarta.persistence</groupId>
                <artifactId>jakarta.persistence-api</artifactId>
                <version>2.2.3</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.persistence</groupId>
                <artifactId>eclipselink</artifactId>
                <version>2.7.5</version>
            </dependency>
            
            <!-- Jakarta Contexts Dependency Injection -->
            <dependency>
                <groupId>jakarta.enterprise</groupId>
                <artifactId>jakarta.enterprise.cdi-api</artifactId>
                <version>2.0.2</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld.servlet</groupId>
                <artifactId>weld-servlet-shaded</artifactId>
                <version>3.1.3.Final</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.classfilewriter</groupId>
                <artifactId>jboss-classfilewriter</artifactId>
                <version>1.2.4.Final</version>
            </dependency>
            <dependency>
                <groupId>org.apache.openwebbeans</groupId>
                <artifactId>openwebbeans-impl</artifactId>
                <version>2.0.12</version>
            </dependency>
            <dependency>
                <groupId>org.apache.openwebbeans</groupId>
                <artifactId>openwebbeans-jsf</artifactId>
                <version>2.0.12</version>
            </dependency>
            <dependency>
                <groupId>org.apache.openwebbeans</groupId>
                <artifactId>openwebbeans-spi</artifactId>
                <version>2.0.12</version>
            </dependency>
            
            <!-- Jakarta XML Bind -->
            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>2.3.2</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
                <version>2.3.2</version>
            </dependency>
            
            <!-- Jakarta Annotation -->
            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>1.3.5</version>
            </dependency>
            
            <!-- JNDI -->
            <dependency>
                <groupId>com.manorrock.herring</groupId>
                <artifactId>herring</artifactId>
                <version>19.11.0</version>
            </dependency>

            <!-- JSON -->            
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.json</artifactId>
                <version>1.1.6</version>
            </dependency>
            
            <!-- MicroProfile -->
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-config</artifactId>
                <version>1.3.11</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye</groupId>
                <artifactId>smallrye-health</artifactId>
                <version>2.1.0</version>
            </dependency>
           
            
            <!-- MVC Frameworks -->
            
            <!-- Vaadin -->
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-client-compiled</artifactId>
                <version>8.9.2</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-server</artifactId>
                <version>8.9.2</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-themes</artifactId>
                <version>8.9.2</version>
            </dependency>
           
            <!-- Struts -->
            <dependency>
                <groupId>org.apache.struts</groupId>
                <artifactId>struts2-core</artifactId>
                <version>2.5.20</version>
            </dependency>
            
            <!-- Wicket -->
            <dependency>
                <groupId>org.apache.wicket</groupId>
                <artifactId>wicket-core</artifactId>
                <version>8.6.1</version>
            </dependency>
            
            <!-- Spring MVC -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>5.2.1.RELEASE</version>
            </dependency>
            
            <!-- Test -->
            <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>2.5.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.10</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
                <!-- downgraded to 2.8.2 because 3.0.0-M1 has deploy problems -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.0.0-M3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.0.0-M1</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.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.2.3</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>clirr-maven-plugin</artifactId>
                    <version>2.8</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>tidy-maven-plugin</artifactId>
                    <version>1.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.5</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                    <checkstyleRules>
                        <module name="Checker">
                            <property name="fileExtensions" value="java"/>
                            <module name="Header">
                                <property name="header"
                                          value="/*\n * Copyright (c) 2002-2020 Manorrock.com. All Rights Reserved.\n *"/>
                            </module>
                            <module name="TreeWalker">
                                <module name="ArrayTrailingComma"/>
                                <module name="AvoidStarImport"/>
                                <module name="ConstantName"/>
                                <module name="CovariantEquals"/>
                                <module name="DeclarationOrder"/>
                                <module name="ModifierOrder"/>
                                <module name="UnusedImports"/>
                            </module>
                        </module>
                    </checkstyleRules>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.1.0</version>
                                </requireMavenVersion>
                            </rules>    
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <addDefaultEntries>false</addDefaultEntries>
                        </manifest>
                        <manifestEntries>
                            <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                            <Build-Version>${project.version}</Build-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
                        <manifest>
                            <addDefaultEntries>false</addDefaultEntries>
                        </manifest>
                    </archive>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tidy-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <inherited>true</inherited>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>3.1.12.2</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                </configuration>
                <inherited>true</inherited>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
                <reportSets>
                    <reportSet>
                        <reports/>
                    </reportSet>
                </reportSets>
            </plugin>        
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
        <profile>
            <id>tck</id>
            <modules>
                <module>tck</module>
            </modules>
        </profile>
        
        <profile>
            <id>test</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>test</module>
            </modules>
        </profile>
    </profiles>
</project>
