<?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 https://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.2</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.github.aman-1995</groupId>
	<artifactId>mailhandler</artifactId>
	<version>0.0.2</version>
	<name>Mail Utility</name>
	<description>Mail utility backend</description>
	<url>https://github.com/aman-1995/webcomponents</url>

	<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>
	
	<licenses>
        	<license>
            		<name>MIT License</name>
            		<url>https://github.com/aman-1995/webcomponents/blob/main/LICENSE</url>
            		<distribution>repo</distribution>
        	</license>
    	</licenses>
    
	<developers>
		<developer>
			<name>Aman Prasad</name>
			<email>akprasad1995@gmail.com</email>
			<timezone>UTC+05:30</timezone>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/aman-1995/webcomponents.git</connection>
		<developerConnection>scm:git:git@github.com:aman-1995/webcomponents.git</developerConnection>
		<url>https://github.com/aman-1995/webcomponents</url>
		<tag>mailhandler-0.0.2</tag>
	</scm>
	<properties>
		<java.version>11</java.version>
		<skipTests>true</skipTests>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        	<destinationDir>${project.build.outputDirectory}</destinationDir>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.mariadb.jdbc</groupId>
			<artifactId>mariadb-java-client</artifactId>
			<scope>runtime</scope>
		</dependency>
		
		<dependency>
	     	<groupId>org.springframework.boot</groupId>
	      	<artifactId>spring-boot-starter-data-jpa</artifactId>
	    </dependency>
    
		<dependency>
			<groupId>org.flywaydb</groupId>
			<artifactId>flyway-core</artifactId>
		</dependency>
		
		<dependency>
		   <groupId>org.apache.commons</groupId>
		   <artifactId>commons-text</artifactId>
		   <version>1.9</version>
		</dependency>
		
		<!-- https://mvnrepository.com/artifact/javax.mail/mail -->
		<dependency>
		    <groupId>javax.mail</groupId>
		    <artifactId>mail</artifactId>
		    <version>1.4.7</version>
		</dependency>
		
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-freemarker</artifactId>
		</dependency>
		
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<dependencies>
					<!-- The following enables the "thin jar" deployment option. -->
					<dependency>
						<groupId>org.springframework.boot.experimental</groupId>
						<artifactId>spring-boot-thin-layout</artifactId>
						<version>1.0.11.RELEASE</version>
					</dependency>
				</dependencies>
			</plugin>
			 <plugin>
				<groupId>org.springframework.boot.experimental</groupId>
				<artifactId>spring-boot-thin-maven-plugin</artifactId>
				<version>1.0.25.RELEASE</version>
				<executions>
					<execution>
					<!-- Download the dependencies at build time -->
					<id>resolve</id>
					<goals>
						<goal>resolve</goal>
					</goals>
					<inherited>false</inherited>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<localCheckout>true</localCheckout>
					<pushChanges>false</pushChanges>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>1.9.5</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
		</plugins>
		<resources>
            		<resource>
                		<directory>${project.basedir}/src/main/resources</directory>
                		<targetPath>${destinationDir}</targetPath>
	    		</resource>		
        	</resources>
	</build>
	<profiles>
		<!-- GPG Signature on release -->
		<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>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>

