<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2016, 2017 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 v1.0 and Eclipse Distribution License v. 1.0
 which accompanies this distribution.
 The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 and the Eclipse Distribution License is available at
 http://www.eclipse.org/org/documents/edl-v10.php.
-->
<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>

    <distributionManagement>
        <snapshotRepository>
            <id>repo.eclipse.org</id>
            <name>Yasson Snapshots</name>
            <url>https://repo.eclipse.org/content/repositories/yasson-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>repo.eclipse.org</id>
            <name>Yasson Releases</name>
            <url>https://repo.eclipse.org/content/repositories/yasson-releases/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>yasson-releases</id>
            <name>Yasson Releases</name>
            <url>https://repo.eclipse.org/content/repositories/yasson-releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>java.net-Public</id>
            <name>Maven Java Net Snapshots and Releases</name>
            <url>https://maven.java.net/content/groups/public/</url>
        </repository>
        <repository>
            <id>java.net-Staging</id>
            <name>Maven Java Net Staging</name>
            <url>https://maven.java.net/content/groups/staging/</url>
        </repository>
    </repositories>

    <groupId>org.eclipse</groupId>
    <artifactId>yasson</artifactId>
    <version>1.0.1</version>
    <packaging>jar</packaging>
    <name>org.eclipse.yasson</name>

    <description>Eclipse Yasson. Reference implementation of JSR-367 (JSON-B).</description>
    <url>https://projects.eclipse.org/projects/rt.yasson</url>

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

    <issueManagement>
        <system>github</system>
        <url>https://github.com/eclipse/yasson/issues</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>Yasson mailing list</name>
            <post>yasson-dev@eclipse.org</post>
            <subscribe>https://dev.eclipse.org/mailman/listinfo/yasson-dev</subscribe>
            <unsubscribe>https://dev.eclipse.org/mailman/listinfo/yasson-dev</unsubscribe>
            <archive>https://dev.eclipse.org/mhonarc/lists/yasson-dev/</archive>
        </mailingList>
    </mailingLists>

    <licenses>
        <license>
            <name>Eclipse Distribution License 1.0 (BSD)</name>
            <url>https://projects.eclipse.org/content/eclipse-distribution-license-1.0-bsd</url>
        </license>
        <license>
            <name>Eclipse Public License 1.0</name>
            <url>https://projects.eclipse.org/content/eclipse-public-license-1.0</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:ssh://git@github.com/eclipse/yasson.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/eclipse/yasson.git</developerConnection>
        <url>https://github.com/eclipse/yasson.git</url>
        <tag>yasson-1.0.1</tag>
    </scm>

    <developers>
        <developer>
            <email>dmitry.kornilov@oracle.com</email>
            <id>maiden168</id>
            <name>Dmitry Kornilov</name>
            <organization>Oracle</organization>
            <roles>
                <role>JSON Binding 1.0 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>JSON Binding 1.0 Developer</role>
            </roles>
            <timezone>CET</timezone>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <javax.json.version>1.1.2</javax.json.version>
        <javax.json.bind.version>1.0</javax.json.bind.version>
        <netbeans.hint.jdkPlatform>JDK_9</netbeans.hint.jdkPlatform>
    </properties>

    <profiles>
        <profile>
            <id>jdk9</id>
            <activation>
                <jdk>[1.9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-compile</id>
                                <configuration>
                                    <excludes>
                                        <exclude>module-info.java</exclude>
                                    </excludes>
                                    <compilerArgs>
                                        <arg>-Xlint:all</arg>
                                    </compilerArgs>
                                </configuration>
                            </execution>
                            <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>
                                </configuration>
                            </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>
                                        <artifactItem>
                                            <groupId>javax.json.bind</groupId>
                                            <artifactId>javax.json.bind-api</artifactId>
                                            <version>${javax.json.bind.version}</version>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>${project.build.directory}</outputDirectory>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.19.1</version>
                        <configuration>
                            <!-- TODO remove when fixed in weld/cdi -->
                            <argLine>
                                --add-opens java.base/java.lang=ALL-UNNAMED
                            </argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-central</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>re-build</id>
            <activation>
                <property>
                    <name>license.url</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>wagon-maven-plugin</artifactId>
                        <version>1.0</version>
                        <inherited>false</inherited>
                        <executions>
                            <execution>
                                <id>get-license</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>download-single</goal>
                                </goals>
                                <configuration>
                                    <url>${license.url}</url>
                                    <fromFile>TLDA_SCSL_Licensees_License_Notice.txt</fromFile>
                                    <toDir>${project.build.directory}/license</toDir>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>make-licensee-src-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <finalName>yasson-${project.version}-src-licensee</finalName>
                                    <attach>false</attach>
                                    <appendAssemblyId>false</appendAssemblyId>
                                    <descriptors>
                                        <descriptor>src/main/assembly/assembly-src-licensee.xml</descriptor>
                                    </descriptors>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <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.1</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>3.0.2</version>
                    <configuration>
                        <archive>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </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>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <configuration>
                        <failOnError>true</failOnError>
                        <doctitle>Yasson</doctitle>
                        <sourcepath>${basedir}/src/main/java/org/eclipse/yasson</sourcepath>
                    </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.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.3.0</version>
                    <executions>
                        <execution>
                            <id>osgi-bundle</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                            <configuration>
                                <instructions>
                                    <_failok>true</_failok>
                                    <Bundle-Name>${project.name}</Bundle-Name>
                                    <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                                    <Bundle-Version>${project.version}</Bundle-Version>
                                    <Export-Package>org.eclipse.yasson;version=${project.version}</Export-Package>
                                    <Private-Package>org.eclipse.yasson.*;version=${project.version}</Private-Package>
                                    <Import-Package>
                                        javax.enterprise.context.spi;version=!,
                                        javax.enterprise.inject.spi;version=!,
                                        *
                                    </Import-Package>
                                </instructions>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release-central</releaseProfiles>
                        <goals>deploy</goals>
                    </configuration>
                </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.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.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.json.bind</groupId>
                <artifactId>javax.json.bind-api</artifactId>
                <version>${javax.json.bind.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.json</groupId>
                <artifactId>javax.json-api</artifactId>
                <version>${javax.json.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>2.0</version>
                <optional>true</optional>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.json</artifactId>
                <version>${javax.json.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.weld.se</groupId>
                <artifactId>weld-se</artifactId>
                <version>2.4.3.Final</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>javax.json.bind</groupId>
            <artifactId>javax.json.bind-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.json</groupId>
            <artifactId>javax.json-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.weld.se</groupId>
            <artifactId>weld-se</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>

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