<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) 2019, 2026 Contributors to Eclipse Foundation.
    Copyright (c) 1997, 2018 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>2.0.2</version>
        <relativePath />
    </parent>

    <groupId>org.glassfish.external</groupId>
    <artifactId>dbschema-osgi</artifactId>
    <version>2.9.0</version>

    <name>Schema2beans OSGi</name>
    <description>NetBeans DBSchema library repackaged for Eclipse GlassFish to support OSGi</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>dbschema-2.9.0</tag>
    </scm>

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

    <properties>
        <dbschema.version>RELEASE290</dbschema.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-modules-dbschema</artifactId>
            <version>${dbschema.version}</version>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-nodes</artifactId>
            <version>${dbschema.version}</version>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util-ui</artifactId>
            <version>${dbschema.version}</version>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.6.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>6.0.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.10.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.12.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.6.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.8</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.15.0</version>
                    <configuration>
                        <skipMain>true</skipMain>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.5.0</version>
                    <configuration>
                        <skipIfEmpty>true</skipIfEmpty>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.3.1</version>
                    <configuration>
                        <lineSeparator>lf</lineSeparator>
                        <autoResolveSnapshots>true</autoResolveSnapshots>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <pushChanges>false</pushChanges>
                        <tagNameFormat>DBSchema-@{project.version}</tagNameFormat>
                    </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>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Embed-Dependency>
                            org-netbeans-modules-dbschema.*;inline=true|META-INF/LICENSE|META-INF/NOTICE|org/netbeans/modules/dbschema/*.class|org/netbeans/modules/dbschema/*.properties,
                            org-openide-nodes;inline=true|org/openide/nodes/*.class,
                            org-openide-util-ui;inline=true|org/openide/util/HelpCtx.class
                        </Embed-Dependency>
                        <Export-Package>*;password="GlassFish"; mandatory:=password</Export-Package>
                        <Import-Package>javax.xml.parsers,org.xml.sax,!*</Import-Package>
                        <Private-Package>!*</Private-Package>
                    </instructions>

                </configuration>
                <executions>
                    <execution>
                        <id>osgi-bundle</id>
                        <phase>package</phase>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--
                unpack and attach the sources.jar(s) available
                This allows us to generate proper sources jar and javadoc jar
            -->
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack-sources</id>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <phase>generate-sources</phase>
                        <configuration>
                            <excludes>META-INF/**</excludes>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.netbeans.modules</groupId>
                                    <artifactId>org-netbeans-modules-dbschema</artifactId>
                                    <version>${dbschema.version}</version>
                                    <classifier>sources</classifier>
                                    <outputDirectory>${project.build.directory}/sources</outputDirectory>
                                    <includes>
                                        META-INF/LICENSE,
                                        META-INF/NOTICE,
                                        org/netbeans/modules/dbschema/**
                                    </includes>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-nodes</artifactId>
                                    <version>${dbschema.version}</version>
                                    <classifier>sources</classifier>
                                    <outputDirectory>${project.build.directory}/sources</outputDirectory>
                                    <includes>org/openide/nodes/**</includes>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-util-ui</artifactId>
                                    <version>${dbschema.version}</version>
                                    <classifier>sources</classifier>
                                    <outputDirectory>${project.build.directory}/sources</outputDirectory>
                                    <includes>org/openide/util/HelpCtx.java</includes>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-sources</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/sources</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- We don't need javadoc, but it is fragile and we need to detect issues early -->
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>javadoc-no-fork</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <doclint>none</doclint>
                            <additionalDependencies>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-netbeans-api-progress</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-netbeans-api-progress-nb</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-netbeans-modules-db</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-netbeans-modules-projectapi</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-netbeans-modules-projectuiapi</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-awt</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-dialogs</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-filesystems</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-loaders</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-windows</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-util</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.api</groupId>
                                    <artifactId>org-openide-util-lookup</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                                <additionalDependency>
                                    <groupId>org.netbeans.external</groupId>
                                    <artifactId>ddl</artifactId>
                                    <version>${dbschema.version}</version>
                                </additionalDependency>
                            </additionalDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>oss-release</id>
            <properties>
                <release.projectName>DBSchema OSGi</release.projectName>
                <release.autoPublish>false</release.autoPublish>
                <release.waitUntil>published</release.waitUntil>
            </properties>
        </profile>
    </profiles>
</project>
