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

    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 http://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.6</version>
        <relativePath />
    </parent>

    <groupId>org.glassfish.external</groupId>
    <artifactId>derby</artifactId>
    <name>Apache Derby repackaged</name>
    <version>10.15.2.0</version>
    <packaging>pom</packaging>

    <properties>
        <derby.version>10.15.2.0</derby.version>
        <derby.download.url>http://www-eu.apache.org/dist/db/derby/db-derby-${derby.version}/db-derby-${derby.version}-bin.zip</derby.download.url>
    </properties>

    <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>

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

    <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>HEAD</tag>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>download-files</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <!-- download the zip -->
                                <mkdir dir="target/tmp"/>
                                <get src="${derby.download.url}" dest="target/tmp/" verbose="false" usetimestamp="true" />
                                <unzip src="target/tmp/db-derby-${derby.version}-bin.zip" dest="target/tmp/"/>
                                <zip destfile="target/derby-${project.version}.zip" basedir="target/tmp/db-derby-${derby.version}-bin" />
                                <delete dir="target/tmp"/>
                            </target>
                         </configuration>
                      </execution>
                 </executions>
             </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
                 <version>3.2.0</version>
                 <executions>
                     <execution>
                         <id>attach-artifacts</id>
                         <phase>prepare-package</phase>
                         <goals>
                             <goal>attach-artifact</goal>
                         </goals>
                         <configuration>
                             <artifacts>
                                 <artifact>
                                     <file>${project.build.directory}/${project.build.finalName}.zip</file>
                                     <type>zip</type>
                                 </artifact>
                             </artifacts>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <arguments>${release.arguments}</arguments>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.11.2</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>
