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

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

    <parent>
        <groupId>org.eclipse.ee4j</groupId>
        <artifactId>project</artifactId>
        <version>1.0.6</version>
        <relativePath />
    </parent>

    <groupId>org.glassfish.jsftemplating</groupId>
    <artifactId>jsftemplating-parent</artifactId>
    <version>3.0.0</version>
    <packaging>pom</packaging>

    <description>JSFTemplating is to work with Jakarta Faces technology to make building pages and components easier. It is used to define the layout of an example component.</description>
    <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>

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

    <modules>
        <module>jsft</module>
        <module>jsftemplating</module>
        <module>jsftemplating-dt</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/eclipse-ee4j/glassfish-jsftemplating</connection>
        <developerConnection>scm:git:https://github.com/eclipse-ee4j/glassfish-jsftemplating</developerConnection>
        <url>https://github.com/eclipse-ee4j/glassfish-jsftemplating</url>
        <tag>HEAD</tag>
    </scm>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/eclipse-ee4j/glassfish-jsftemplating/issues</url>
    </issueManagement>

    <properties>
        <jdk.version>1.8.0</jdk.version>
        <mvn.version>3.0.3</mvn.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <javadoc.options>-Xdoclint:none</javadoc.options>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>5.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.faces</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>jakarta.faces</groupId>
                <artifactId>jakarta.faces-api</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>jakarta.el</groupId>
                <artifactId>jakarta.el-api</artifactId>
                <version>4.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.sun.woodstock.dependlibs</groupId>
                <artifactId>dataprovider</artifactId>
                <version>1.0</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.1</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                 <!-- Sets minimal Maven version to 3.5.4 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M3</version>
                    <executions>
                        <execution>
                            <id>enforce-maven</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>3.5.4</version>
                                    </requireMavenVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                
                <!-- Restricts the Java version to 1.8 -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <compilerArgument>-Xlint:unchecked</compilerArgument>
                    </configuration>
                </plugin>
                
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9.1</version>
                    <configuration>
                        <additionalparam>-Xdoclint:none</additionalparam>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                    <configuration>
                        <includePom>true</includePom>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <configuration>
                        <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <skip>true</skip>
                        <skipDeploy>true</skipDeploy>
                    </configuration>
                </plugin>
                
                <!-- Creates the OSGi MANIFEST.MF file -->
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>5.1.1</version>
                    <configuration>
                        <instructions>
                            <!-- By default, we don't export anything. -->
                            <Export-Package />
                            <Bundle-Version>${project.osgi.version}</Bundle-Version>
                            <!-- Read all the configuration from osgi.bundle file, if it exists. See Felix-699 to find out 
                                why we use ${basedir}. -->
                            <_include>-${basedir}/osgi.bundle</_include>
                        </instructions>
                    </configuration>
                </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>
                    <version>3.2.0</version>
                    <configuration>
                        <archive>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M4</version>
                    <configuration>
                        <forkCount>0</forkCount>
                        <systemPropertyVariables>
                            <propertyName>com.sun.jsftemplating.DEBUG</propertyName>
                            <buildDirectory>true</buildDirectory>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>[${jdk.version},)</version>
                                    <message>You need JDK ${jdk.version} and above!</message>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>[${mvn.version},)</version>
                                    <message>You need Maven ${mvn.version} or above!</message>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.glassfish.hk2</groupId>
                <artifactId>osgiversion-maven-plugin</artifactId>
                <version>2.3.0-b05</version>
                <executions>
                    <execution>
                        <id>compute-osgi-version</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>compute-osgi-version</goal>
                        </goals>
                        <configuration>
                            <dropVersionComponent>qualifier</dropVersionComponent>
                            <versionPropertyName>project.osgi.version</versionPropertyName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
