<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<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>org.eclipse.ee4j</groupId>
        <artifactId>project</artifactId>
        <version>1.0.6</version>
    </parent>

    <groupId>org.glassfish.main</groupId>
    <artifactId>glassfish-main-aggregator</artifactId>
    <version>6.2.2</version>
    <packaging>pom</packaging>

    <name>GlassFish Project</name>
    <description>Glassfish Project</description>
    <url>https://projects.eclipse.org/projects/ee4j.glassfish</url>

    <scm>
      <connection>scm:git:git://github.com/eclipse-ee4j/glassfish</connection>
      <developerConnection>scm:git:git://github.com/eclipse-ee4j/glassfish</developerConnection>
      <url>https://github.com/eclipse-ee4j/glassfish</url>
    </scm>

    <!--
        Skip deploy and install as this is an aggregator POM
    -->
    <build>
        <defaultGoal>install</defaultGoal>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                     <groupId>org.glassfish.copyright</groupId>
                     <artifactId>glassfish-copyright-maven-plugin</artifactId>
                     <version>1.42</version>
                     <configuration>
                        <scm>git</scm>
                        <scmOnly>true</scmOnly>
                        <exclude>
                            <pattern>.md</pattern>
                            <pattern>LICENSE</pattern>
                        </exclude>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Sets minimal Maven version to 3.5.4 -->
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.5.4</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-phase2</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>release-phase-all</name>
                    <value>true</value>
                </property>
            </activation>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
            </modules>
        </profile>
        <profile>
            <!--
                RE profile for release purposes.
            -->
            <id>ips</id>
            <activation>
                <property>
                    <name>release-phase-all</name>
                    <value>true</value>
                </property>
            </activation>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
            </modules>
        </profile>
        <profile>
            <id>set-version-id</id>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
                <module>nucleus/hk2/config-generator</module>
                <module>docs</module>
                <module>appserver/admingui/devtests</module>
                <module>appserver/extras/embedded/common</module>
                <module>nucleus/tests</module>
            </modules>
        </profile>

        <profile>
            <id>jacoco-merge</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.7</version>
                        <executions>
                            <execution>
                                <id>jacoco-merge</id>
                                <phase>verify</phase>
                                <inherited>false</inherited>
                                <goals>
                                    <goal>merge</goal>
                                </goals>
                                <configuration>
                                    <fileSets>
                                        <fileSet>
                                            <directory>${basedir}</directory>
                                            <includes>
                                                <include>**/*.exec</include>
                                            </includes>
                                        </fileSet>
                                    </fileSets>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
