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

    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.

    The contents of this file are subject to the terms of either the GNU
    General Public License Version 2 only ("GPL") or the Common Development
    and Distribution License("CDDL") (collectively, the "License").  You
    may not use this file except in compliance with the License.  You can
    obtain a copy of the License at
    https://oss.oracle.com/licenses/CDDL+GPL-1.1
    or LICENSE.txt.  See the License for the specific
    language governing permissions and limitations under the License.

    When distributing the software, include this License Header Notice in each
    file and include the License file at LICENSE.txt.

    GPL Classpath Exception:
    Oracle designates this particular file as subject to the "Classpath"
    exception as provided by Oracle in the GPL Version 2 section of the License
    file that accompanied this code.

    Modifications:
    If applicable, add the following below the License Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyright [year] [name of copyright owner]"

    Contributor(s):
    If you wish your version of this file to be governed by only the CDDL or
    only the GPL Version 2, indicate your decision by adding "[Contributor]
    elects to include this software in this distribution under the [CDDL or GPL
    Version 2] license."  If you don't indicate a single choice of license, a
    recipient has the option to distribute your version of this file under
    either the CDDL, the GPL Version 2 or to extend the choice of license to
    its licensees as provided above.  However, if you add GPL Version 2 code
    and therefore, elected the GPL Version 2 license, then the option applies
    only if the new code is made subject to such option by the copyright
    holder.

-->

<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>net.java</groupId>
        <artifactId>jvnet-parent</artifactId>
        <version>5</version>
    </parent>

    <groupId>javax.json.bind</groupId>
    <artifactId>javax.json.bind-api</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>
    <name>javax.json.bind-api</name>

    <url>https://javaee.github.io/jsonb-spec</url>

    <organization>
        <name>Oracle Corporation</name>
        <url>http://www.oracle.com</url>
    </organization>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/javaee/jsonb-spec/issues</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>JSON-B Discussion Group </name>
            <archive>jsonb-spec@javaee.groups.io</archive>
        </mailingList>
    </mailingLists>

    <licenses>
        <license>
            <name>Dual license consisting of the CDDL v1.1 and GPL v2</name>
            <url>https://oss.oracle.com/licenses/CDDL+GPL-1.1</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/javaee/jsonb-spec.git</connection>
        <developerConnection>scm:git:git@github.com:javaee/jsonb-spec.git</developerConnection>
        <url>https://github.com/javaee/jsonb-spec</url>
        <tag>1.0</tag>
    </scm>

    <developers>
        <developer>
            <email>dmitry.kornilov@oracle.com</email>
            <id>dmitry.kornilov</id>
            <name>Dmitry Kornilov</name>
            <organization>Oracle</organization>
            <roles>
                <role>Spec Lead</role>
            </roles>
            <timezone>CET</timezone>
        </developer>
        <developer>
            <email>roman.grigoriadi@oracle.com</email>
            <id>roman.grigoriadi</id>
            <name>Roman Grigoriadi</name>
            <organization>Oracle</organization>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>CET</timezone>
        </developer>
    </developers>

    <profiles>
        <profile>
            <id>jdk9</id>
            <activation>
                <jdk>[1.9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <docfilessubdirs>true</docfilessubdirs>
                            <additionalparam>--add-modules java.json --module-path ${project.build.directory}/javax.json-api-${javax.json.version}.jar</additionalparam>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>jdk-9</id>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                                <configuration>
                                    <release>9</release>
                                    <source>9</source>
                                    <target>9</target>
                                    <includes>
                                        <include>module-info.java</include>
                                    </includes>
                                    <compilerArgs>
                                        <arg>-J-Xmodule:java.json.bind</arg>
                                    </compilerArgs>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>non-jdk9</id>
            <activation>
                <jdk>(,1.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>
                        <configuration>
                            <sourceFileExcludes>
                                <sourceFileExclude>**/module-info.java</sourceFileExclude>
                            </sourceFileExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>final</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <!-- Final API bundle version properties -->
                <spec.version>${next.final.spec.version}</spec.version>
                <new.spec.version />
                <milestone.number />
                <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-release-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <finalName>${project.artifactId}</finalName>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.4</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.6.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>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.5</version>
                </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.3</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.2</version>
                    <configuration>
                        <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>${project.groupId}</apiPackage>
                        </spec>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>set-spec-properties</goal>
                                <goal>check-module</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.3.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <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>Oracle Corporation</Specification-Vendor>
                            <_nodefaultversion>false</_nodefaultversion>
                            <Export-Package>javax.json.bind.*</Export-Package>
                            <_failok>true</_failok> <!-- FIXME: FELIX-5430 -->
                        </instructions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>osgi-bundle</id>
                            <phase>package</phase>
                            <goals>
                                <goal>bundle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                    <configuration>
                         <failOnError>true</failOnError>
                        <doctitle>JSON-Binding ${project.version} API Specification</doctitle>
                        <bottom>
                            <![CDATA[Copyright &#169; 1996-2017,
                                <a href="http://www.oracle.com">Oracle</a>
                                and/or its affiliates. All Rights Reserved.
                                Use is subject to
                                <a href="{@docRoot}/doc-files/spec-license.html" target="_top">license terms</a>.]]>
                        </bottom>
                        <javaApiLinks>
                            <property>
                                <name>api_1.3</name>
                                <value>http://download.oracle.com/javase/1.3/docs/api/</value>
                            </property>
                            <property>
                                <name>api_1.4</name>
                                <value>http://download.oracle.com/javase/1.4.2/docs/api/</value>
                            </property>
                            <property>
                                <name>api_1.5</name>
                                <value>http://download.oracle.com/javase/1.5.0/docs/api/</value>
                            </property>
                            <property>
                                <name>api_1.6</name>
                                <value>http://download.oracle.com/javase/6/docs/api/</value>
                            </property>
                            <property>
                                <name>api_1.7</name>
                                <value>http://download.oracle.com/javase/7/docs/api/</value>
                            </property>
                            <property>
                                <name>api_1.8</name>
                                <value>http://download.oracle.com/javase/8/docs/api/</value>
                            </property>
                        </javaApiLinks>
                    </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>2.3</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-deploy-plugin</artifactId>
                    <version>2.8.1</version>
                    <configuration>
                        <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <!--
                        To release a non-final version:
                        ===============================
                        mvn release:prepare -DdryRun=false -DreleaseVersion=<release-version> \
                                -DdevelopmentVersion=<next-dev-version> -Dtag=<release-version> -Prelease

                        mvn release:perform -DconnectionUrl="scm:git:file://<path-to-local-jsonb-repo>" -Dtag=<release-version> \
                                -Prelease,skip-tests

                        To release a final version:
                        ===========================
                        mvn release:prepare -DdryRun=false -DreleaseVersion=<release-version> \
                                -DdevelopmentVersion=<next-dev-version> -Dtag=<release-version> -Prelease,final

                        mvn release:perform -DconnectionUrl="scm:git:file://<path-to-local-jsonb-repo>" -Dtag=<release-version> \
                                -Prelease,skip-tests,final
                    -->
                    <configuration>
                        <arguments>-Dmaven.test.skip=${skip.release.tests} ${release.arguments}</arguments>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <preparationGoals>clean install</preparationGoals>
                        <pushChanges>false</pushChanges>
                        <useReleaseProfile>false</useReleaseProfile>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>2.3</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.40</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/copyright.txt</templateFile>
                    </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>2.17</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>6.11.2</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-dependency-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>copy</id>
                            <phase>package</phase>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>javax.json</groupId>
                                        <artifactId>javax.json-api</artifactId>
                                        <version>${javax.json.version}</version>
                                        <overWrite>true</overWrite>
                                        <outputDirectory>${project.build.directory}</outputDirectory>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-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-dependency-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>

    <dependencies>
        <dependency>
            <groupId>javax.json</groupId>
            <artifactId>javax.json-api</artifactId>
            <version>${javax.json.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <last.final.spec.version>0.9</last.final.spec.version>
        <milestone.number>01</milestone.number>
        <next.final.spec.version>1.0</next.final.spec.version>
        <new.spec.version>${next.final.spec.version}</new.spec.version>
        <non.final>true</non.final>
        <skip.release.tests>false</skip.release.tests>
        <spec.version>${last.final.spec.version}</spec.version>
        <javax.json.version>1.1</javax.json.version>
    </properties>

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