<?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.4.4</version>
		<relativePath />
	</parent>

	<groupId>com.graphql-java-generator</groupId>
	<artifactId>graphql-maven-plugin-project</artifactId>
	<version>1.18</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-1.18</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-client-dependencies</module>
		<module>graphql-java-server-dependencies</module>
		<module>graphql-java-runtime</module>
		<module>graphql-java-spring-mvc</module>
		<module>graphql-maven-plugin-logic</module>
		<module>graphql-maven-plugin</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>1.8</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven.dependency.version>3.6.3</maven.dependency.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>
	</properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.8</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<release>8</release>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</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.2.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.6.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>3.0.0-M1</version>
					<configuration>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<useReleaseProfile>false</useReleaseProfile>
						<releaseProfiles>release,!withSamples</releaseProfiles>
						<goals>deploy</goals>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-scm-plugin</artifactId>
					<version>1.11.2</version>
					<configuration>
						<tag>${project.artifactId}-${project.version}</tag>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.9.1</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-M4</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>1.6.8</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</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>

	</build>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>3.9.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>3.9.0</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.0</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.7.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.sonatype.plexus</groupId>
				<artifactId>plexus-build-api</artifactId>
				<version>0.0.7</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-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>graphql-java</artifactId>
				<version>16.2</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java</groupId>
				<artifactId>graphql-java-spring-boot-starter-webmvc</artifactId>
				<version>2.0</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java</groupId>
				<artifactId>graphql-java-spring-webmvc</artifactId>
				<version>2.0</version>
			</dependency>
			<dependency>
				<!-- com.graphql-java:graphiql-spring-boot-starter is deprecated. This project has been moved to com.graphql-java-kickstart -->
				<groupId>com.graphql-java-kickstart</groupId>
				<artifactId>graphiql-spring-boot-starter</artifactId>
				<version>11.0.0</version>
				<scope>runtime</scope>
			</dependency>
			<dependency>
				<groupId>com.graphql-java</groupId>
				<artifactId>java-dataloader</artifactId>
				<version>2.2.3</version>
			</dependency>
			<dependency>
				<groupId>com.graphql-java</groupId>
				<artifactId>graphql-java-extended-scalars</artifactId>
				<version>16.0.1</version>
			</dependency>


			<!-- Other dependencies -->
			<dependency>
				<groupId>javax.activation</groupId>
				<artifactId>activation</artifactId>
				<version>1.1.1</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.8.0</version>
			</dependency>
			<dependency>
				<groupId>com.github.dozermapper</groupId>
				<artifactId>dozer-core</artifactId>
				<version>6.5.2</version>
			</dependency>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>30.1.1-jre</version>
			</dependency>
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>1.4.200</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.persistence</groupId>
				<artifactId>org.eclipse.persistence.jpa</artifactId>
				<version>2.7.4</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.12</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>com.opencsv</groupId>
				<artifactId>opencsv</artifactId>
				<version>5.0</version>
			</dependency>
			<dependency>
				<groupId>org.apache.velocity</groupId>
				<artifactId>velocity</artifactId>
				<version>1.7</version>
			</dependency>
			<dependency>
				<groupId>org.awaitility</groupId>
				<artifactId>awaitility</artifactId>
				<version>4.0.3</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<configuration>
					<skipDeploy>true</skipDeploy>
				</configuration>
			</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, when the "release" profile is not active. It embeds all samples. -->
			<!-- This prevents the sample to pollute the maven central repository -->
			<id>withSamples</id>
			<activation>
				<property>
					<name>!skipSamples</name>
				</property>
			</activation>
			<modules>
				<module>graphql-maven-plugin-samples</module>
			</modules>
		</profile>
	</profiles>

</project>