<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	Copyright 2021 Jeremy KUHN
	
	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at
	
	   http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
 -->
<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>io.winterframework</groupId>
		<artifactId>winter-oss-parent</artifactId>
		<version>1</version>
	</parent>
	<artifactId>winter-mods-root</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>
	
	<name>winter-mods-root</name>
	<description>The Winter framework modules are a collection of components for building fully reactive applications</description>
	<inceptionYear>2020</inceptionYear>
	<organization>
		<name>Winter Framework IO</name>
		<url>https://winterframework.io</url>
	</organization>
	<url>https://github.com/winterframework-io/winter</url>

	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>https://spdx.org/licenses/Apache-2.0</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>jkuhn</id>
			<name>Jeremy Kuhn</name>
			<email>jeremy.kuhn@winterframework.io</email>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/winterframework-io/winter-mods.git</url>
		<connection>scm:git:git://github.com/winterframework-io/winter-mods.git</connection>
		<developerConnection>scm:git:git@github.com:winterframework-io/winter-mods.git</developerConnection>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/winterframework-io/winter-mods/issues</url>
	</issueManagement>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>9</maven.compiler.source>
		<maven.compiler.target>9</maven.compiler.target>

		<version.winter>1.1.0</version.winter>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.winterframework</groupId>
				<artifactId>winter-core</artifactId>
				<version>${version.winter}</version>
			</dependency>
			<dependency>
				<groupId>io.winterframework</groupId>
				<artifactId>winter-core-annotation</artifactId>
				<version>${version.winter}</version>
			</dependency>
			<dependency>
				<groupId>io.winterframework</groupId>
				<artifactId>winter-core-compiler</artifactId>
				<version>${version.winter}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<modules>
		<!-- Compilers must be built first -->
		<module>winter-configuration-compiler</module>
		<module>winter-web-compiler</module>
		
		<module>winter-base</module>
		<module>winter-boot</module>
		<module>winter-configuration</module>
		<module>winter-http-base</module>
		<module>winter-http-server</module>
		<module>winter-web</module>
		
		<module>winter-mods-test</module>
	</modules>
	
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<annotationProcessorPaths combine.children="append">
							<path>
								<groupId>io.winterframework</groupId>
								<artifactId>winter-core-compiler</artifactId>
								<version>${version.winter}</version>
							</path>
						</annotationProcessorPaths>
						<compilerArgs>
							<arg>--module-version=${project.version}</arg>
							<arg>-Awinter.verbose=true</arg>
							<arg>-Awinter.debug=true</arg>
						</compilerArgs>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	
	<profiles>
		<profile>
			<id>io.winterframework.prerelease</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<source>9</source>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>io.winterframework.release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<source>9</source>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
