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

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

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>35</version>
    </parent>

    <groupId>org.jboss.spec.javax.interceptor</groupId>
    <artifactId>jboss-interceptors-api_1.2_spec</artifactId>

    <version>2.0.0.Final</version>

    <name>Jboss Jakarta Interceptors API</name>
    <description>
        Jakarta Interceptors defines a means of interposing on business method invocations
        and specific events—such as lifecycle events and timeout events—that occur on instances
        of Jakarta EE components and other managed classes.
    </description>

    <url>https://github.com/jboss/jboss-jakarta-interceptors-api_spec</url>

    <properties>
        <non.final>false</non.final>
        <extension.name>javax.interceptor</extension.name>
        <spec.version>1.2</spec.version>
        <findbugs.exclude>exclude.xml</findbugs.exclude>
        <findbugs.threshold>Low</findbugs.threshold>
        <version.spec-version-maven-plugin>2.0</version.spec-version-maven-plugin>
        <vendor.name>Eclipse Foundation</vendor.name>
        <bundle.specification.title>Jakarta Interceptors ${spec.version} Specification</bundle.specification.title>
        <automatic.module.name>beta.jboss.interceptor.api_1_2</automatic.module.name>
    </properties>

    <licenses>
        <license>
            <name>EPL 2.0</name>
            <url>http://www.eclipse.org/legal/epl-2.0</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>GPL2 w/ CPE</name>
            <url>https://www.gnu.org/software/classpath/license.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <issueManagement>
        <system>JIRA</system>
        <url>https://issues.jboss.org/projects/JBEE/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git@github.com:jboss/jboss-jakarta-interceptors-api_spec.git</connection>
        <developerConnection>scm:git:git@github.com:jboss/jboss-jakarta-interceptors-api_spec.git</developerConnection>
        <url>https://github.com/jboss/jboss-jakarta-interceptors-api_spec.git</url>
        <tag>HEAD</tag>
    </scm>

    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.html</include>
                </includes>
            </resource>
            <resource>
                <directory>${project.basedir}/..</directory>
                <includes>
                    <include>LICENSE.md</include>
                    <include>NOTICE.md</include>
                </includes>
                <targetPath>META-INF</targetPath>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>META-INF/README</exclude>
                </excludes>
            </resource>
        </resources>
        
        <plugins>
            <!-- Restricts the Java version to 1.8 -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
            
            <!-- First sets properties for the maven-bundle-plugin and later checks if they are indeed used. -->
            <plugin>
                <groupId>org.glassfish.build</groupId>
                <artifactId>spec-version-maven-plugin</artifactId>
                <version>${version.spec-version-maven-plugin}</version>
                <configuration>
                    <specMode>jakarta</specMode>
                    <spec>
                        <nonFinal>${non.final}</nonFinal>
                        <jarType>api</jarType>
                        <specVersion>${spec.version}</specVersion>
                        <specImplVersion>${project.version}</specImplVersion>
                        <apiPackage>${extension.name}</apiPackage>
                    </spec>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>set-spec-properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!-- Creates the OSGi MANIFEST.MF file -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>false</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                    <supportedProjectTypes>
                        <supportedProjectType>jar</supportedProjectType>
                    </supportedProjectTypes>
                    <instructions>
                        <Automatic-Module-Name>${automatic.module.name}</Automatic-Module-Name>
                        <Bundle-Version>${spec.bundle.version}</Bundle-Version>
                        <Bundle-SymbolicName>${groupId}.${artifactId}</Bundle-SymbolicName>
                        <Extension-Name>${spec.extension.name}</Extension-Name>
                        <Implementation-Version>${spec.implementation.version}</Implementation-Version>
                        <Specification-Version>${spec.specification.version}</Specification-Version>
                        <Bundle-Description>${project.description}</Bundle-Description>
                        <Specification-Vendor>${vendor.name}</Specification-Vendor>
                        <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
                        <Implementation-Vendor-Id>${groupId}</Implementation-Vendor-Id>
                        <Specification-Title>${bundle.specification.title}</Specification-Title>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!-- Adds the manifest file created by the org.apache.felix:maven-bundle-plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                    <excludes>
                        <exclude>**/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            
            <!-- Creates the source jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <configuration>
                    <includePom>true</includePom>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!-- 
               Create Javadoc for API jar
             -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>

                <executions>
                    <execution>
                        <id>attach-api-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <source>1.8</source>
                            <additionalJOption>-Xdoclint:none</additionalJOption>
                            <description>Jakarta Interceptors API documentation</description>
                            <doctitle>Jakarta Interceptors API documentation</doctitle>
                            <windowtitle>Jakarta Interceptors API documentation</windowtitle>
                            <header><![CDATA[<br>Jakarta Interceptors API v${project.version}]]></header>
                            <bottom><![CDATA[
Comments to: <a href="mailto:interceptors-dev@eclipse.org">interceptors-dev@eclipse.org</a>.<br>
Copyright &#169; 2019 Eclipse Foundation. All rights reserved.<br>
Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.]]>
                            </bottom>
                            <docfilessubdirs>true</docfilessubdirs>
                            <groups>
                                <group>
                                    <title>Jakarta Interceptors API Documentation</title>
                                    <packages>
                                        javax.interceptor
                                    </packages>
                                </group>
                            </groups>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <threshold>${findbugs.threshold}</threshold>
                    <excludeFilterFile>${findbugs.exclude}</excludeFilterFile>
                    <findbugsXmlOutput>true</findbugsXmlOutput>
                    <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <reporting>
                        <plugins>
                            <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>findbugs-maven-plugin</artifactId>
                                <version>${findbugs.version}</version>
                                <configuration>
                                    <threshold>${findbugs.threshold}</threshold>
                                    <excludeFilterFile>${findbugs.exclude}</excludeFilterFile>
                                </configuration>
                            </plugin>
                        </plugins>
                    </reporting>
                </configuration>
            </plugin>
        </plugins>
        
    </build>
</project>
