<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) 2019, 2025 Contributors to the Eclipse Foundation.
    Copyright (c) 2018, 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/maven-v4_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.external</groupId>
    <artifactId>derby</artifactId>
    <version>10.17.1.0</version>
    <packaging>pom</packaging>

    <name>Apache Derby for Eclipse GlassFish</name>
    <description>Apache Derby redeployed for Eclipse GlassFish</description>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <mailingLists>
      <mailingList>
          <name>GlassFish 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>

    <scm>
        <connection>scm:git:git@github.com:eclipse-ee4j/glassfish-repackaged.git</connection>
        <developerConnection>scm:git:git@github.com:eclipse-ee4j/glassfish-repackaged.git</developerConnection>
        <url>https://github.com/eclipse-ee4j/glassfish-repackaged.git</url>
        <tag>Derby-10.17.1.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/eclipse-ee4j/glassfish-repackaged/issues</url>
    </issueManagement>

    <!-- TODO: Can be removed after it would be removed from parent too -->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Disabled Sonatype Nexus</name>
            <url>http://localhost</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Disabled Sonatype Nexus</name>
            <url>http://localhost</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </distributionManagement>

    <properties>
        <derby.version>10.17.1.0</derby.version>
        <derby.download.url>https://dlcdn.apache.org//db/derby/db-derby-${derby.version}/db-derby-${derby.version}-bin.zip</derby.download.url>
    </properties>

    <build>
        <pluginManagement>
          <plugins>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.6.2</version>
                </plugin>
                <plugin>
                    <groupId>io.github.download-maven-plugin</groupId>
                    <artifactId>download-maven-plugin</artifactId>
                    <version>2.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.6.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <lineSeparator>lf</lineSeparator>
                        <autoResolveSnapshots>true</autoResolveSnapshots>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <pushChanges>false</pushChanges>
                        <tagNameFormat>Schema2Beans-@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.7.0</version>
                    <configuration>
                        <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
                    </configuration>
                    <executions>
                        <execution>
                            <id>injected-nexus-deploy</id>
                            <phase>none</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.9.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <autoPublish>${release.autopublish}</autoPublish>
                        <centralSnapshotsUrl>https://central.sonatype.com/repository/maven-snapshots</centralSnapshotsUrl>
                        <deploymentName>Eclipse GlassFish Derby ${project.version}</deploymentName>
                        <publishingServerId>central</publishingServerId>
                        <waitUntil>${release.waitUntil}</waitUntil>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.9.0</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>17</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.github.download-maven-plugin</groupId>
                <artifactId>download-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>download</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>wget</goal>
                        </goals>
                        <configuration>
                            <url>${derby.download.url}</url>
                            <unpack>true</unpack>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.7.1</version>
                <configuration>
                    <appendAssemblyId>false</appendAssemblyId>
                    <inlineDescriptors>
                        <inlineDescriptor>
                            <id>derby</id>
                            <includeBaseDirectory>false</includeBaseDirectory>
                            <formats>
                                <format>zip</format>
                            </formats>
                            <fileSets>
                                <fileSet>
                                    <directory>${project.build.directory}/db-derby-${derby.version}-bin</directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                    <outputDirectory>/</outputDirectory>
                                </fileSet>
                            </fileSets>
                        </inlineDescriptor>
                    </inlineDescriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>package</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-gpg-plugin</artifactId>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
