<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>net.java</groupId>
        <artifactId>jvnet-parent</artifactId>
        <version>5</version>
    </parent>

    <groupId>javax.security.enterprise</groupId>
    <artifactId>javax.security.enterprise-api</artifactId>
    <version>1.0-b07</version>
    <packaging>bundle</packaging>

    <name>Java EE Security API</name>
    <description>Security API for Java EE Applications</description>
    <inceptionYear>2015</inceptionYear>

    <properties>
        <api_package>javax.security.enterprise</api_package>

        <non_final>true</non_final>
        <spec_version>0.0</spec_version>
        <spec_impl_version>${project.version}</spec_impl_version>
        <new_spec_version>1.0</new_spec_version>
        <spec_build>07</spec_build>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <packages.export>javax.security.enterprise.*</packages.export>
    </properties>

    <licenses>
        <license>
            <name>
                Dual license consisting of the CDDL v1.1 and GPL v2
            </name>
            <url>https://glassfish.java.net/public/CDDL+GPL_1_1.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/javaee-security-spec/security-api.git</connection>
        <developerConnection>scm:git:https://github.com/javaee-security-spec/security-api.git</developerConnection>
        <url>https://github.com/javaee-security-spec/security-api</url>
        <tag>1.0-b07</tag>
    </scm>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
            </plugin>
            <!--
             This plugin is responsible for packaging artifacts
             as OSGi bundles.  Please refer to
             http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html
             for more information about how to use this plugin.
            -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>3.2.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Version>${spec.bundle.version}</Bundle-Version>
                        <Bundle-SymbolicName>${spec.bundle.symbolic-name}</Bundle-SymbolicName>
                        <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>
                        <Export-Package>${packages.export}</Export-Package>
                    </instructions>
                </configuration>
            </plugin>
            <!-- Configure the jar with the sources (or rather, convince Maven that
            we want sources at all) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Configure the jar with the javadoc (or rather, convince Maven that
            we want javadoc at all) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <javadocVersion>1.8</javadocVersion>
                    <notimestamp>true</notimestamp>
                    <splitindex>true</splitindex>
                    <doctitle>${project.name} ${project.version}</doctitle>
                    <links>
                        <link>https://docs.oracle.com/javaee/7/api/</link>
                    </links>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <header>src/license/header.txt</header>
                    <properties>
                        <owner>Oracle</owner>
                        <currentYear>2017</currentYear>
                    </properties>
                    <excludes>
                        <exclude>**/*.adoc</exclude>
                        <exclude>**/*.launch</exclude>
                        <exclude>**/*.sh</exclude>
                        <exclude>**/pom.xml</exclude>
                        <exclude>**/README</exclude>
                        <exclude>**/settings.xml</exclude>
                        <exclude>src/license/**</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                        <exclude>*.txt</exclude>
                    </excludes>
                    <headerDefinitions>
                        <headerDefinition>src/license/headers.xml</headerDefinition>
                    </headerDefinitions>
                    <mapping>
                        <java>JAVA_STYLE</java>
                    </mapping>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.glassfish.build</groupId>
                <artifactId>spec-version-maven-plugin</artifactId>
                <version>1.2</version>
                <configuration>
                    <spec>
                        <jarType>api</jarType>
                        <nonFinal>${non_final}</nonFinal>
                        <apiPackage>${api_package}</apiPackage>
                        <specVersion>${spec_version}</specVersion>
                        <specImplVersion>${spec_impl_version}</specImplVersion>
                        <newSpecVersion>${new_spec_version}</newSpecVersion>
                        <specBuild>${spec_build}</specBuild>
                    </spec>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>set-spec-properties</goal>
                            <goal>check-module</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <arguments>${release.arguments}</arguments>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- This plugin's configuration is used to store Eclipse m2e settings only.
                 It has no influence on the Maven build itself. -->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.glassfish.build</groupId>
                                    <artifactId>spec-version-maven-plugin</artifactId>
                                    <versionRange>[1.2,)</versionRange>
                                    <goals>
                                        <goal>set-spec-properties</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <checkoutDirectory>${project.build.directory}/javadoc-scm</checkoutDirectory>
                    <checkinComment>Publishing Javadoc for ${project.artifactId}:${project.version}</checkinComment>
                    <content>${project.reporting.outputDirectory}/apidocs</content>
                    <pubScmUrl>scm:git:git@github.com:javaee-security-spec/security-api.git</pubScmUrl>
                    <scmBranch>gh-pages</scmBranch>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!-- This plugin's configuration is used to store Eclipse m2e settings only.
                     It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.glassfish.build
                                        </groupId>
                                        <artifactId>
                                            spec-version-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.2,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                set-spec-properties
                                            </goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
