<?xml version="1.0" encoding="UTF-8"?>
<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.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>

	<groupId>org.pac4j</groupId>
	<artifactId>pac4j-parent</artifactId>
	<packaging>pom</packaging>
	<name>pac4j parent</name>
	<version>5.5.0</version>
	<description>Profile &amp; Authentication Client for Java</description>
	<url>https://github.com/pac4j/pac4j</url>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/pac4j/pac4j.git</url>
		<connection>scm:git:git@github.com:pac4j/pac4j.git</connection>
		<developerConnection>scm:git:git@github.com:pac4j/pac4j.git</developerConnection>
	</scm>

	<developers>
		<developer>
			<id>leleuj</id>
			<name>Jerome LELEU</name>
			<email>leleuj@gmail.com</email>
		</developer>
	</developers>

	<modules>
        <module>pac4j-javaee</module>
        <module>pac4j-jakartaee</module>
		<module>pac4j-core</module>
		<module>pac4j-config</module>
		<module>pac4j-oauth</module>
		<module>pac4j-cas</module>
		<module>pac4j-http</module>
		<module>pac4j-saml</module>
		<module>pac4j-gae</module>
		<module>pac4j-oidc</module>
		<module>pac4j-jwt</module>
		<module>pac4j-ldap</module>
		<module>pac4j-sql</module>
		<module>pac4j-mongo</module>
		<module>pac4j-couch</module>
		<module>pac4j-kerberos</module>
        <module>pac4j-springboot</module>
	</modules>

	<properties>
		<junit.version>4.13.2</junit.version>
		<servlet-api.version>4.0.1</servlet-api.version>
        <jakarta-servlet-api.version>6.0.0</jakarta-servlet-api.version>
		<logback.version>1.4.0</logback.version>
		<commons-codec.version>1.15</commons-codec.version>
		<commons-io.version>2.11.0</commons-io.version>
		<guava.version>31.1-jre</guava.version>
		<nimbus-jose-jwt.version>9.24.3</nimbus-jose-jwt.version>
		<spring.version>5.3.22</spring.version>
		<spring.security.version>5.7.3</spring.security.version>
		<shiro.version>1.9.1</shiro.version>
        <jbcrypt.version>0.4.3</jbcrypt.version>
		<mockito.version>4.8.0</mockito.version>
		<slf4j.version>2.0.0</slf4j.version>
        <unboundid.version>6.0.6</unboundid.version>
        <h2.version>2.1.214</h2.version>
		<java.version>11</java.version>
        <jackson.version>2.13.4</jackson.version>
        <reflections.version>0.10.2</reflections.version>
        <nanohttpd.version>2.3.1</nanohttpd.version>
        <mockserver.version>5.10</mockserver.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-core</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-config</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-oauth</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-cas</artifactId>
				<version>${project.version}</version>
			</dependency>
            <dependency>
                <groupId>org.pac4j</groupId>
                <artifactId>pac4j-saml</artifactId>
                <version>${project.version}</version>
            </dependency>
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-oidc</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-ldap</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-http</artifactId>
				<version>${project.version}</version>
			</dependency>
            <dependency>
                <groupId>org.pac4j</groupId>
                <artifactId>pac4j-sql</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.pac4j</groupId>
                <artifactId>pac4j-jwt</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-crypto</artifactId>
				<version>${spring.security.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.shiro</groupId>
				<artifactId>shiro-core</artifactId>
				<version>${shiro.version}</version>
			</dependency>
            <dependency>
                <groupId>de.svenkubiak</groupId>
                <artifactId>jBCrypt</artifactId>
                <version>${jbcrypt.version}</version>
            </dependency>
			<dependency>
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>${commons-codec.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${commons-io.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>${servlet-api.version}</version>
			</dependency>
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>${jakarta-servlet-api.version}</version>
            </dependency>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${guava.version}</version>
			</dependency>
			<dependency>
				<groupId>com.nimbusds</groupId>
				<artifactId>nimbus-jose-jwt</artifactId>
				<version>${nimbus-jose-jwt.version}</version>
			</dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.13.4</version>
            </dependency>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${reflections.version}</version>
            </dependency>
            <!-- for testing -->
			<dependency>
				<groupId>org.pac4j</groupId>
				<artifactId>pac4j-core</artifactId>
				<version>${project.version}</version>
				<type>test-jar</type>
			</dependency>
            <dependency>
                <groupId>org.pac4j</groupId>
                <artifactId>pac4j-ldap</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
            </dependency>
            <dependency>
                <groupId>org.pac4j</groupId>
                <artifactId>pac4j-sql</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
            </dependency>
            <dependency>
                <groupId>org.pac4j</groupId>
                <artifactId>pac4j-http</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
            </dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>${spring.version}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
			</dependency>
            <dependency>
                <groupId>com.unboundid</groupId>
                <artifactId>unboundid-ldapsdk</artifactId>
                <version>${unboundid.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${h2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.nanohttpd</groupId>
                <artifactId>nanohttpd</artifactId>
                <version>${nanohttpd.version}</version>
            </dependency>
			<dependency>
				<groupId>com.github.tomakehurst</groupId>
				<artifactId>wiremock-jre8</artifactId>
				<version>2.33.2</version>
				<scope>test</scope>
			</dependency>
			<!-- for testing -->
		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
							<finalName>${project.artifactId}-${project.version}-all.jar</finalName>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<includes>
						<include>**/*Tests.java</include>
                        <include>**/*Test.java</include>
					</includes>
                </configuration>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.2.0</version>
				<dependencies>
					<dependency>
						<groupId>com.puppycrawl.tools</groupId>
						<artifactId>checkstyle</artifactId>
						<version>10.3.3</version>
					</dependency>
				</dependencies>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                </configuration>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <failOnViolation>true</failOnViolation>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<skipTests>true</skipTests>
					<includes>
						<include>**/*IT.java</include>
					</includes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.10.1</version>
				<configuration>
                    <release>${java.version}</release>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<!-- Build helper maven plugin sets the parsedVersion.osgiVersion property -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
					  <id>regex-property</id>
					  <goals>
					    <goal>regex-property</goal>
					  </goals>
					  <configuration>
					    <name>module.suffix</name>
					    <value>${project.artifactId}</value>
					    <regex>^(pac4j\-)(.*)$</regex>
					    <replacement>$2</replacement>
					    <failIfNoMatch>false</failIfNoMatch>
					  </configuration>
					</execution>
					<execution>
						<id>set-osgi-version</id>
						<phase>verify</phase>
						<goals>
							<goal>parse-version</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archive>
						<manifestEntries>
							<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
							<Bundle-Name>${project.name}</Bundle-Name>
							<Bundle-SymbolicName>${project.groupId}.${module.suffix}.source</Bundle-SymbolicName>
							<Bundle-Vendor>${organization.name}</Bundle-Vendor>
							<Bundle-Version>${parsedVersion.osgiVersion}</Bundle-Version>
							<Eclipse-SourceBundle>${project.groupId}.${module.suffix};version="${parsedVersion.osgiVersion}";roots:="."</Eclipse-SourceBundle>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<version>4.2.3</version>
				<configuration>
					<effort>Low</effort> <!-- Max -->
					<threshold>Max</threshold> <!-- Medium Low -->
					<failOnError>true</failOnError>
					<excludeFilterFile>${basedir}/../spotbugs-exclude.xml</excludeFilterFile>
					<includeTests>true</includeTests>
				</configuration>
				<executions>
					<execution>
						<id>run-spotbugs</id>
						<phase>compile</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.13.0</version>
				<configuration>
					<includeTests>true</includeTests>
					<printFailingErrors>true</printFailingErrors>
				</configuration>
				<executions>
					<execution>
						<id>run-pmd</id>
						<phase>compile</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.2</version>
					<configuration>
						<archive>
							<!-- configure plugin to use MANIFEST.MF
                        	generated by maven-bundle-plugin -->
							<manifestFile>
								${project.build.outputDirectory}/META-INF/MANIFEST.MF
							</manifestFile>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.4.1</version>
					<configuration>
						<source>1.8</source>
                        <detectJavaApiLink>false</detectJavaApiLink>
						<doclint>none</doclint>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>5.1.8</version>
					<extensions>true</extensions>
					<executions>
						<execution>
							<id>bundle-manifest</id>
							<phase>process-classes</phase>
							<goals>
								<goal>manifest</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<!-- configure plugin to support jar packaging -->
						<supportedProjectTypes>
							<supportedProjectType>jar</supportedProjectType>
						</supportedProjectTypes>
					</configuration>
				</plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.22.2</version>
                </plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>forceIT</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<skipTests>false</skipTests>
							<includes>
								<include>**/*IT.java</include>
							</includes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
