<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.7.18</version>
		<relativePath />
	</parent>

	<groupId>com.graphql-java-generator</groupId>
	<artifactId>graphql-maven-plugin-project</artifactId>
	<version>2.5</version>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>
		This project is an accelerator to develop GraphQL clients and GraphQL
		servers in java.
		That is, it generates the boilerplate code, and let you concentrate on
		what's specific to your use case:
		the queries/mutations/subscriptions you will call, when in client mode.
		And the response to the queries/mutations/subscriptions call, as well as
		the relations between objects, when in server mode.
	</description>
	<url>https://github.com/graphql-java-generator/graphql-java-generator</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>EtienneSF</name>
			<email>etienne_sf@users.sf.net</email>
		</developer>
	</developers>

	<scm>
		<!-- See the connection id in the properties, which allows to define the
		credentials -->
		<!-- See first response of
		https://stackoverflow.com/questions/28282572/maven-release-plugin-git-credentials -->
		<!-- Principle the project.scm.id property allows to define a server
		name, then define the relevant user/password for this 
			server id in the settings.xml -->
		<connection>scm:git:https://github.com/graphql-java-generator/graphql-maven-plugin-project.git</connection>
		<developerConnection>scm:git:https://github.com/graphql-java-generator/graphql-maven-plugin-project.git</developerConnection>
		<url>https://github.com/graphql-java-generator/graphql-maven-plugin-project/tree/master</url>
		<tag>graphql-maven-plugin-project-2.5</tag>
	</scm>

	<distributionManagement>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<site>
			<id>www.graphql-java-generator.com</id>
			<url>https://graphql-maven-plugin-project.graphql-java-generator.com</url>
		</site>
	</distributionManagement>

	<modules>
		<!-- Below are the module that are always in the build -->
		<!-- The samples (within graphql-maven-plugin-samples module) are
		activated only when not in release mode (see profiles) -->
		<module>graphql-java-common-dependencies</module>
		<module>graphql-java-common-runtime</module>
		<module>graphql-java-client-dependencies</module>
		<module>graphql-java-client-runtime</module>
		<module>graphql-java-server-runtime</module>
		<module>graphql-java-server-dependencies</module>
		<module>graphql-maven-plugin-logic</module>
		<module>graphql-maven-plugin</module>
		<!-- The graphql-maven-plugin-samples module is activate in the profile
		"withSamples", see below -->
		<!-- module>graphql-maven-plugin-samples</module -->
	</modules>

	<properties>
		<!-- See the connection id in the properties, which allows to define the
		credentials -->
		<!-- See first response of
		https://stackoverflow.com/questions/28282572/maven-release-plugin-git-credentials -->
		<!-- Principle the project.scm.id property allows to define a server
		name, then define the relevant user/password for this 
			server id in the settings.xml -->
		<project.scm.id>git-graphql-java-generator</project.scm.id>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>8</java.version>
		<java.release>8</java.release>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven.dependency.version>3.8.1</maven.dependency.version>
		<maven-site-plugin.version>4.0.0-M7</maven-site-plugin.version>
		<maven-project-info-reports-plugin.version>3.3.0</maven-project-info-reports-plugin.version>

		<!-- The lastReleasedVersion is the version displayed in the site. The
		default value is the project version, which is Ok 
			when actually doing a release. It can also be defined on the command line with
		-DlastReleasedVersion=version when building 
			the site afterward -->
		<lastReleasedVersion>${project.version}</lastReleasedVersion>

		<!-- Below are some versions that overrides the one coming from
		spring-boot-starter -->
		<!-- snakeyaml priori to 1.31 have various vulnarabilities -->
		<snakeyaml.version>1.33</snakeyaml.version>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.11.0</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<release>${java.release}</release>
					</configuration>
				</plugin>
				<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>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.5.0</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<!-- add this to disable checking -->
						<doclint>none</doclint>
						<failOnError>false</failOnError>
						<sourceFileExcludes>
							<sourceFileExclude>**/target/**</sourceFileExclude>
						</sourceFileExcludes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>3.4.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>3.0.0</version>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<useReleaseProfile>false</useReleaseProfile> <!-- ignore
						the default release profile -->
						<releaseProfiles>release,!withSamples</releaseProfiles>
						<goals>deploy</goals>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-scm-plugin</artifactId>
					<version>2.0.0</version>
					<configuration>
						<tag>${project.artifactId}-${project.version}</tag>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven-site-plugin.version}</version>
					<configuration>
						<skipDeploy>true</skipDeploy>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
							<configuration>
								<additionalparam>${javadoc.opts}</additionalparam>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.13</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>com.thoughtworks.xstream</groupId>
							<artifactId>xstream</artifactId>
							<version>1.4.20</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<!-- This plugin allows to start the SpringBoot
					StarWars-server in the background during the integration
					tests -->
					<groupId>com.bazaarvoice.maven.plugins</groupId>
					<artifactId>process-exec-maven-plugin</artifactId>
					<version>0.9</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven-site-plugin.version}</version>
			</plugin>
		</plugins>

	</build>

	<dependencyManagement>
		<dependencies>
			<!-- Dependencies for tests-->
			<dependency>
				<groupId>org.awaitility</groupId>
				<artifactId>awaitility</artifactId>
				<version>4.2.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>4.8.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>4.8.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.javatuples</groupId>
				<artifactId>javatuples</artifactId>
				<version>1.2</version>
				<scope>test</scope>
			</dependency>

			<!-- Dependencies used to build the Maven plugin -->
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-aether-provider</artifactId>
				<version>3.3.9</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-artifact</artifactId>
				<version>${maven.dependency.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-compat</artifactId>
				<version>${maven.dependency.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-core</artifactId>
				<version>${maven.dependency.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-model</artifactId>
				<version>${maven.dependency.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-plugin-api</artifactId>
				<version>${maven.dependency.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>3.6.4</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-testing</groupId>
				<artifactId>maven-plugin-testing-harness</artifactId>
				<version>3.3.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-project</artifactId>
				<version>2.2.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.shared</groupId>
				<artifactId>maven-verifier</artifactId>
				<version>1.8.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.sonatype.plexus</groupId>
				<artifactId>plexus-build-api</artifactId>
				<version>0.0.7</version>
			</dependency>
			<dependency>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-utils</artifactId>
				<version>3.0.24</version>
			</dependency>
			<!-- dependencies within this project -->
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-java-spring-mvc</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-java-client-dependencies</artifactId>
				<version>${project.version}</version>
				<type>pom</type>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-java-server-dependencies</artifactId>
				<version>${project.version}</version>
				<type>pom</type>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-java-common-dependencies</artifactId>
				<version>${project.version}</version>
				<type>pom</type>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-java-common-runtime</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-java-client-runtime</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-java-server-runtime</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-maven-plugin-logic</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-maven-plugin-samples-allGraphQLCases-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>
					graphql-maven-plugin-samples-OAuth-authorization-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-maven-plugin-samples-Basic-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-maven-plugin-samples-Forum-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java-generator</groupId>
				<artifactId>graphql-maven-plugin-samples-StarWars-server</artifactId>
				<type>war</type>
				<version>${project.version}</version>
			</dependency>

			<!-- dependencies for graphql -->
			<dependency>
				<groupId>com.graphql-java</groupId>
				<artifactId>java-dataloader</artifactId>
				<version>3.2.0</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java</groupId>
				<artifactId>graphql-java-extended-scalars</artifactId>
				<version>19.0</version>
			</dependency>

			<!-- Other dependencies -->
			<dependency>
				<groupId>javax.activation</groupId>
				<artifactId>activation</artifactId>
				<version>1.1.1</version>
			</dependency>
			<dependency>
				<!-- This dependency is here to solve an issue with Mockito that
				loads a wring version of byte-buddy -->
				<groupId>net.bytebuddy</groupId>
				<artifactId>byte-buddy</artifactId>
				<version>1.12.18</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.11.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-text</artifactId>
				<version>1.10.0</version>
			</dependency>
			<dependency>
				<groupId>com.github.dozermapper</groupId>
				<artifactId>dozer-core</artifactId>
				<version>6.5.2</version>
			</dependency>
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>2.2.220</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.persistence</groupId>
				<artifactId>org.eclipse.persistence.jpa</artifactId>
				<version>2.7.4</version>
			</dependency>
			<dependency>
				<!-- Avoids this warning (when building in Gradle): unknown enum
				constant When.MAYBE -->
				<groupId>com.google.code.findbugs</groupId>
				<artifactId>jsr305</artifactId>
				<version>3.0.2</version>
			</dependency>
			<dependency>
				<groupId>org.leadpony.justify</groupId>
				<artifactId>justify</artifactId>
				<version>2.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>1.18.24</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-oauth2-authorization-server</artifactId>
				<version>0.3.1</version>
			</dependency>
			<dependency>
				<groupId>com.nimbusds</groupId>
				<artifactId>oauth2-oidc-sdk</artifactId>
				<version>9.22.2</version>
			</dependency>
			<dependency>
				<groupId>org.yaml</groupId>
				<artifactId>snakeyaml</artifactId>
				<version>${snakeyaml.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.velocity</groupId>
				<artifactId>velocity-engine-core</artifactId>
				<version>2.3</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven-site-plugin.version}</version>
				<configuration>
					<skipDeploy>true</skipDeploy>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>${maven-project-info-reports-plugin.version}</version>
			</plugin>
		</plugins>
	</reporting>


	<profiles>

		<profile>
			<!-- Activate this release, to generate releases, and deploy them to
			the central repository -->
			<!--
			https://central.sonatype.org/pages/apache-maven.html#performing-a-release-deployment -->
			<!-- mvn com.github.github:site-maven-plugin:site -Prelease -->
			<!-- Issue raised:
			https://github.com/github/maven-plugins/issues/139 -->
			<id>release</id>

			<properties>
				<releaseMode>true</releaseMode>
				<skipSamples>true</skipSamples>
			</properties>

			<build>
				<plugins>
					<!-- mvn release:clean release:prepare -->
					<!-- mvn release:perform -DskipSamples=true -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
					<plugin>
						<!-- -->
						<!-- NOT USED. USE maven-release-plugin, instead -->
						<!-- -->
						<!-- The change of the versions for your project, and
						the parent references in a multi module setup, can be
						performed 
							manually or with the help of the Maven versions plugin. -->
						<!-- mvn versions:set -DnewVersion=1.2.3 -->
						<!-- If your version is a release version (does not end
						in -SNAPSHOT) and with this setup in place, you can run
						a deployment 
							to OSSRH and an automated release to the Central Repository with the usual: -->
						<!-- mvn clean deploy -Prelease -->
						<!-- With the property autoReleaseAfterClose set to
						false you can manually inspect the staging repository in
						the Nexus 
							Repository Manager and trigger a release of the staging repository later with -->
						<!-- mvn nexus-staging:release -P release -->
						<!-- If you find something went wrong you can drop the
						staging repository with -->
						<!-- mvn nexus-staging:drop -Prelease -->
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
					</plugin>
					<plugin>
						<!-- To manually publish the site, with my local conf: -->
						<!-- mvn site:stage -->
						<!-- "C:\appli\java\apache-ant\bin\ant.bat" -f
						ant-deploy-site.xml -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<!-- executions> <execution> <phase>site-deploy</phase>
						<goals> <goal>run</goal> </goals> </execution>
						</executions -->
						<configuration>
							<target>
								<ant antfile="ant-deploy-site.xml" />
							</target>
						</configuration>
						<inherited>false</inherited>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<!-- This profile is activated by default. It embeds all samples. -->
			<!-- It is deactivated by setting the skipSamples property to true -->
			<id>withSamples</id>
			<activation>
				<property>
					<name>!skipSamples</name>
				</property>
			</activation>
			<modules>
				<module>graphql-maven-plugin-samples</module>
			</modules>
		</profile>
	</profiles>

</project>