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

    Copyright (c) 2016, 2019 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.eclipse.ee4j</groupId>
        <artifactId>project</artifactId>
        <version>1.0.5</version>
    </parent>

    <groupId>jakarta.json.bind</groupId>
    <artifactId>jakarta.json.bind-api</artifactId>
    <version>1.0.2</version>
    <packaging>jar</packaging>

    <name>JSON-B API</name>
    <description>Jakarta JSON Binding is a standard binding layer for converting Java objects to/from JSON documents.</description>
    <inceptionYear>2016</inceptionYear>
    <url>https://eclipse-ee4j.github.io/jsonb-api</url>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/eclipse-ee4j/jsonb-api/issues</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>Mailing list</name>
            <archive>jsonb-dev@eclipse.org</archive>
        </mailingList>
    </mailingLists>

    <licenses>
        <license>
            <name>Eclipse Public License 2.0</name>
            <url>https://projects.eclipse.org/license/epl-2.0</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>GNU General Public License, version 2 with the GNU Classpath Exception</name>
            <url>https://projects.eclipse.org/license/secondary-gpl-2.0-cp</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/eclipse-ee4j/jsonb-api.git</connection>
        <developerConnection>scm:git:git@github.com:eclipse-ee4j/jsonb-api.git</developerConnection>
        <url>https://github.com/eclipse-ee4j/jsonb-api</url>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
          	<id>m0mus</id>
            <name>Dmitry Kornilov</name>
            <email>dmitry.kornilov@oracle.com</email>
            <url>https://dmitrykornilov.net</url>
            <organization>Oracle</organization>
            <roles>
                <role>Project Lead</role>
            </roles>
            <timezone>CET</timezone>
        </developer>
    </developers>

    <properties>
        <release.spec.feedback>jsonb-dev@eclipse.org</release.spec.feedback>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <milestone.number>01</milestone.number>
        <new.spec.version>1.0.1</new.spec.version>
        <non.final>false</non.final>
        <skip.release.tests>false</skip.release.tests>
        <spec.version>1.0</spec.version>
        <jakarta.json.version>1.1.6</jakarta.json.version>
        <api_package>jakarta.json.bind</api_package>
        <legal.doc.source>${project.basedir}/..</legal.doc.source>
        <vendor.name>Oracle Corporation</vendor.name>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>jakarta.json</groupId>
                <artifactId>jakarta.json-api</artifactId>
                <version>${jakarta.json.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>jakarta.json</groupId>
            <artifactId>jakarta.json-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>jdk11</id>
            <activation>
                <jdk>[11,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jdk-11</id>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <source>9</source>
                                    <target>9</target>
                                    <includes>
                                        <include>module-info.java</include>
                                    </includes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>(,9)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>final</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <!-- Final API bundle version properties -->
                <non.final>false</non.final>
            </properties>
        </profile>
        <profile>
            <!-- Use it with release-perform goal to skip another test run. -->
            <id>skip-tests</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <skip.release.tests>true</skip.release.tests>
            </properties>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.5</version>
                    <configuration>
                        <effort>Max</effort>
                        <threshold>Low</threshold>
                        <xmlOutput>true</xmlOutput>
                    </configuration>
                    <executions>
                        <execution>
                            <id>analyze-compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <compilerArgs>
                            <arg>-Xlint:all</arg>
                        </compilerArgs>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-compile</id>
                            <configuration>
                                <excludes>
                                    <exclude>module-info.java</exclude>
                                </excludes>
                                <compilerArgs>
                                    <arg>-Xlint:all</arg>
                                </compilerArgs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <!-- This plugin generates the buildNumber property used in maven-bundle-plugin -->
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.4</version>
                    <configuration>
                        <format>{0,date,MM/dd/yyyy hh:mm aa}</format>
                        <items>
                            <item>timestamp</item>
                        </items>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <!-- This plugin generates the spec.* properties used in maven-bundle-plugin -->
                    <groupId>org.glassfish.build</groupId>
                    <artifactId>spec-version-maven-plugin</artifactId>
                    <version>1.5</version>
                    <configuration>
                        <specMode>jakarta</specMode>
                        <spec>
                            <nonFinal>${non.final}</nonFinal>
                            <jarType>api</jarType>
                            <specVersion>${spec.version}</specVersion>
                            <newSpecVersion>${new.spec.version}</newSpecVersion>
                            <specBuild>${milestone.number}</specBuild>
                            <specImplVersion>${project.version}</specImplVersion>
                            <apiPackage>${api_package}</apiPackage>
                        </spec>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>set-spec-properties</goal>
                                <!-- TODO: Enable when spec version plugin is fixed. -->
                                <!--goal>check-module</goal-->
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.5.1</version>
                    <extensions>true</extensions>
                    <configuration>
                        <archive>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                        <instructions>
                            <Build-Id>${buildNumber}</Build-Id>
                            <Bundle-Description>Java API for JSON Binding (JSON-Binding)</Bundle-Description>
                            <Bundle-Version>${spec.bundle.version}</Bundle-Version>
                            <Bundle-SymbolicName>${spec.bundle.symbolic-name}</Bundle-SymbolicName>
                            <DynamicImport-Package>*</DynamicImport-Package>
                            <Extension-Name>${spec.extension.name}</Extension-Name>
                            <Implementation-Version>${spec.implementation.version}</Implementation-Version>
                            <Specification-Version>${spec.specification.version}</Specification-Version>
                            <Specification-Vendor>${vendor.name}</Specification-Vendor>
                            <_nodefaultversion>false</_nodefaultversion>
                            <Export-Package>javax.json.bind.*; version=${spec.version}</Export-Package>
                            <_noee>true</_noee>
                        </instructions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>osgi-bundle</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <archive>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <source>8</source>
                        <doctitle>Jakarta JSON Binding ${project.version} API Specification</doctitle>
                        <sourceFileExcludes>
                            <sourceFileExclude>**/module-info.java</sourceFileExclude>
                            <sourceFileExclude>target/**/*.java</sourceFileExclude>
                        </sourceFileExcludes>
                        <docfilessubdirs>true</docfilessubdirs>
                        <links>
                            <link>http://docs.oracle.com/javase/8/docs/api/</link>
                        </links>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <header><![CDATA[<br>Jakarta JSON Binding API v${project.version}]]>
                        </header>
                        <bottom><![CDATA[
                        Comments to: <a href="mailto:${release.spec.feedback}">${release.spec.feedback}</a>.<br>
                        Copyright &#169; 2019 Eclipse Foundation. All Rights Reserved.<br>
                        Use is subject to <a href="{@docRoot}/doc-files/EFSL.html" target="_top">license terms</a>.]]>
                        </bottom>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jxr</goal>
                            </goals>
                            <phase>validate</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.glassfish.copyright</groupId>
                    <artifactId>glassfish-copyright-maven-plugin</artifactId>
                    <version>1.50</version>
                    <configuration>
                        <excludeFile>${basedir}/../etc/config/copyright-exclude</excludeFile>
                        <!--svn|mercurial|git - defaults to svn-->
                        <scm>git</scm>
                        <!-- turn on/off debugging -->
                        <debug>false</debug>
                        <!-- skip files not under SCM-->
                        <scmOnly>true</scmOnly>
                        <!-- turn off warnings -->
                        <warn>false</warn>
                        <!-- for use with repair -->
                        <update>false</update>
                        <!-- check that year is correct -->
                        <ignoreYear>false</ignoreYear>
                        <templateFile>${basedir}/../etc/config/epl-copyright.txt</templateFile>
                        <bsdTemplateFile>${basedir}/../etc/config/edl-copyright.txt</bsdTemplateFile>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>compile</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.0.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.14</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <outputFile>${project.build.directory}/checkstyle/checkstyle-result.xml</outputFile>
                        <configLocation>${basedir}/../etc/config/checkstyle.xml</configLocation>
                        <failOnViolation>true</failOnViolation>
                        <failsOnError>true</failsOnError>
                        <excludes>**/module-info.java</excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>compile</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${legal.doc.source}</directory>
                                    <includes>
                                        <include>LICENSE.md</include>
                                        <include>NOTICE.md</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.glassfish.copyright</groupId>
                <artifactId>glassfish-copyright-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.glassfish.build</groupId>
                <artifactId>spec-version-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.5</version>
            </plugin>
        </plugins>
    </reporting>
</project>
