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

    Copyright (c) 2021-2023 Contributors to the Eclipse Foundation.
    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.glassfish.main</groupId>
        <artifactId>nucleus-parent</artifactId>
        <version>7.0.21</version>
        <relativePath>parent</relativePath>
    </parent>

    <artifactId>glassfish-nucleus-parent</artifactId>
    <packaging>pom</packaging>

    <name>GlassFish Nucleus Modules</name>
    <url>https://projects.eclipse.org/projects/ee4j.glassfish</url>
    <licenses>
        <license>
            <name>EPL 2.0</name>
            <url>http://www.eclipse.org/legal/epl-2.0</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>GPL2 w/ CPE</name>
            <url>https://www.gnu.org/software/classpath/license.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <mailingLists>
        <mailingList>
            <name>Glassfish dev mailing list</name>
            <post>glassfish-dev@eclipse.org</post>
            <subscribe>https://dev.eclipse.org/mailman/listinfo/glassfish-dev</subscribe>
            <unsubscribe>https://dev.eclipse.org/mailman/listinfo/glassfish-dev</unsubscribe>
            <archive>https://dev.eclipse.org/mhonarc/lists/glassfish-dev</archive>
        </mailingList>
    </mailingLists>

    <modules>
        <module>parent</module>
        <module>glassfish-jul-extension</module>
        <module>hk2-config-generator</module>
        <module>hk2-config-types</module>
        <module>osgi-platforms</module>
        <module>cluster</module>
        <module>common</module>
        <module>core</module>
        <module>admin</module>
        <module>flashlight</module>
        <module>grizzly</module>
        <module>deployment</module>
        <module>distributions</module>
        <module>security</module>
        <module>test-utils</module>
        <module>diagnostics</module>
        <module>resources</module>
        <module>featuresets</module>
        <module>xmlbind-annotations</module>
        <module>extras</module>
    </modules>

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

    <properties>
        <glassfish.generate-injectors.skip>false</glassfish.generate-injectors.skip>
        <glassfishbuild-maven-plugin.assemblyInputDirectory>${project.build.outputDirectory}</glassfishbuild-maven-plugin.assemblyInputDirectory>
    </properties>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.omnifaces</groupId>
                    <artifactId>antlr-maven-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- Ensures that the artifact is rebuilt before the usage -->
                <dependencies>
                    <dependency>
                        <groupId>org.glassfish.main</groupId>
                        <artifactId>hk2-config-generator</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>generate-hk2-config</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>org.glassfish.main</groupId>
                                    <artifactId>hk2-config-generator</artifactId>
                                    <version>${project.version}</version>
                                </path>
                            </annotationProcessorPaths>
                            <annotationProcessors>
                                <annotationProcessor>org.jvnet.hk2.config.generator.ConfigInjectorGenerator</annotationProcessor>
                            </annotationProcessors>
                            <proc>only</proc>
                            <generatedSourcesDirectory>${project.build.directory}/generated-sources/hk2-config-generator</generatedSourcesDirectory>
                            <createMissingPackageInfoClass>false</createMissingPackageInfoClass>
                            <skipMain>${glassfish.generate-injectors.skip}</skipMain>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
