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

    Copyright (c) 1997, 2018 Oracle and/or its affiliates and others.
    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">
    
    <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>35</version>
    <relativePath />
    </parent>
    
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.jboss.spec.javax.el</groupId>
    <artifactId>jboss-el-api_3.0_spec</artifactId>
    <version>2.0.0.Final</version>
    <packaging>jar</packaging>    
    <name>Expression Language 3.0 API</name>
    <description>
        Expression Language defines an expression language for Java applications
    </description>
    <url>https://projects.eclipse.org/projects/ee4j.el</url>

    <properties>
        <!-- Make sure the two versions are in sync with the maven version -->
        <spec.version>3.0</spec.version>
        <bundle.version>3.0.3</bundle.version>
        <extensionName>javax.el</extensionName>
        <bundle.symbolicName>com.sun.el.javax.el</bundle.symbolicName>
        <vendorName>Oracle Corporation</vendorName>
        <findbugs.version>2.5.2</findbugs.version>
        <findbugs.exclude>exclude.xml</findbugs.exclude>
        <findbugs.threshold>High</findbugs.threshold>
    </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>
      <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
       <license>
            <name>LGPL 2.1 or later</name>
            <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <scm>
      <connection>scm:git:git@github.com:jboss/jboss-jakarta-el-api_spec.git</connection>
      <developerConnection>scm:git:git@github.com:jboss/jboss-jakarta-el-api_spec.git</developerConnection>
        <url>https://github.com/jboss/jboss-jakarta-el-api_spec</url>
        <tag>jboss-el-api_3.0_spec-2.0.0.Final</tag>
    </scm>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
	    <groupId>org.glassfish</groupId>
            <artifactId>javax.el</artifactId>
            <version>3.0.1-b08</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>${project.basedir}/..</directory>
                <includes>
                    <include>LICENSE.md</include>
                    <include>NOTICE.md</include>
                </includes>
                <targetPath>META-INF</targetPath>
            </resource>
        </resources>
    
        <plugins>
             <!-- Restricts the Java version to 1.7 -->
             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.8</target>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
        
            <!-- 
                Configure maven-bundle-plugin to generate OSGi manifest. 
        
                Please note: we use the manifest goal only and not the bundle goal. 
                The bundle goal can lead to very surprising results if the package names are not correctly specified. 
                So, we use the jar plugin to generate the jar. 
            -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <supportedProjectTypes>
                        <supportedProjectType>jar</supportedProjectType>
                    </supportedProjectTypes>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>beta.jboss.el.api_3_0</Automatic-Module-Name>
                        </manifestEntries>
                        <manifest>
                            <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>false</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                    <instructions>
                        <Bundle-Description>
                            Expression Language ${spec.version} API

                        </Bundle-Description>
                        <Export-Package>javax.el;version="3.0.3";version="3.0.3"</Export-Package>
                        <Bundle-SymbolicName>org.jboss.spec.javax.el.jboss-el-api_3.0_spec</Bundle-SymbolicName>
                        <Bundle-Version>${bundle.version}</Bundle-Version>
                        <Extension-Name>${extensionName}</Extension-Name>
                        <Specification-Version>${spec.version}</Specification-Version>
                        <Specification-Vendor>${vendorName}</Specification-Vendor>
                        <Implementation-Version>${project.version}</Implementation-Version>
                        <Implementation-Vendor>JBoss by Red Hat</Implementation-Vendor>
                    </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>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <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>
                <version>3.0.1</version>
                <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>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <id>attach-api-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <source>1.8</source>
                            <additionalJOption>-Xdoclint:none</additionalJOption>
                            <description>Jakarta Expression Language API documentation</description>
                            <doctitle>Jakarta Expression Language API documentation</doctitle>
                            <windowtitle>Jakarta Expression Language API documentation</windowtitle>
                            <header><![CDATA[<br>Jakarta Expression Language API v${project.version}]]></header>
                            <bottom><![CDATA[
Comments to: <a href="mailto:el-dev@eclipse.org">el-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 Expression Language API Documentation</title>
                                    <packages>
                                        javax.el.*
                                    </packages>
                                </group>
                            </groups>
                            <archive>
                                <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.version}</version>
                <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-release-plugin</artifactId>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <arguments>${release.arguments}</arguments>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M2</version>
            </plugin>               
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>          
            </plugin>
        </plugins>
    </build>

    <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>
</project>
