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

    Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation. All rights reserved.
    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 https://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.9</version>
        <relativePath />
    </parent>

    <groupId>org.glassfish.main</groupId>
    <artifactId>glassfish-main-aggregator</artifactId>
    <version>7.0.21</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>

    <properties>
        <project.build.outputTimestamp>2025-01-02T14:56:55Z</project.build.outputTimestamp>
    </properties>

    <build>
        <defaultGoal>install</defaultGoal>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.3</version>
                    <configuration>
                        <!-- Skip deploy as this is an aggregator POM -->
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                     <groupId>org.glassfish.copyright</groupId>
                     <artifactId>glassfish-copyright-maven-plugin</artifactId>
                     <version>2.4</version>
                     <configuration>
                        <scm>git</scm>
                        <scmOnly>true</scmOnly>
                        <exclude>
                            <pattern>.md</pattern>
                            <pattern>LICENSE</pattern>
                        </exclude>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.cyclonedx</groupId>
                    <artifactId>cyclonedx-maven-plugin</artifactId>
                    <version>2.9.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.9.0</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--
                Disables sbom generation inherited from parent
            -->
            <plugin>
                <groupId>org.cyclonedx</groupId>
                <artifactId>cyclonedx-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase></phase>
                        <goals>
                            <goal>makeAggregateBom</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!--
        This profile is implicit when you run maven clean install and is automatically disabled
        when you choose another from this set.
        -->
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
                <module>docs</module>
            </modules>
        </profile>

        <!--
        Build glassfixh.zip as soon as possible.
        Profile of the same id is also in parent, together they exclude unimportant modules and plugin executions.
         -->
        <profile>
            <id>fastest</id>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
            </modules>
        </profile>

        <!--
        Build glassfixh.zip as soon as possible and runs also unit tests.
        Profile of the same id is also in parent, together they exclude unimportant modules and plugin executions.
         -->
        <profile>
            <id>fast</id>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
            </modules>
        </profile>

        <!--
        Build all distributed binaries except documentation and run all maven tests.
        -->
        <profile>
            <id>qa</id>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
            </modules>
        </profile>

        <!--
        Change version number in all artifacts in the repository.
        -->
        <profile>
            <id>set-version-id</id>
            <modules>
                <module>qa</module>
                <module>nucleus</module>
                <module>appserver</module>
                <module>docs</module>
                <module>docs/publish</module>
            </modules>
        </profile>

        <!--
        Merges all exec files in the directory tree - useful when you want to se the code coverage
        produced by integration tests executed by different modules, or exactly opposite - to see
        not covered by tests at all.
        -->
        <profile>
            <id>jacoco-merge</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.12</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>
