<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>

	<artifactId>yop</artifactId>
	<groupId>org.y-op</groupId>
	<version>0.9.0</version>
	<packaging>pom</packaging>
	<name>yop</name>
	<url>https://github.com/ug-dbg/yop</url>
	<description>
		YOP is a lightweight wannabe REST/ORM stack.
		Ω≡{Ⓐ}
	</description>

	<modules>
		<module>reflection</module>
		<module>ioc</module>
		<module>orm</module>
		<module>rest</module>
		<module>swaggerui</module>
		<module>demo</module>
	</modules>

	<developers>
		<developer>
			<id>ug_dbg</id>
			<timezone>Europe/Paris</timezone>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>Postcard Public License</name>
			<url>/dev/null</url>
			<comments>
				You are free to do whatever you want with Yop and its source code.
				If you intend to make money using it, please send me an ugly postcard so I can decorate my fridge.
			</comments>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/ug-dbg/yop</url>
		<connection>scm:git:git://github.com/ug-dbg/yop.git</connection>
		<developerConnection>scm:git:git@github.com:ug-dbg/yop.git</developerConnection>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<logback.version>1.1.2</logback.version>
		<slf4j.version>1.7.7</slf4j.version>
		<maven.compiler.source>1.8</maven.compiler.source>
  		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>

	<distributionManagement>
		<site>
			<id>Rpi</id>
			<url>http://maven.y-op.org</url>
			<name>maven site on Rpi3</name>
		</site>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>release</id>
			<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>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.3.2</version>
					<configuration>
						<source>${maven.compiler.source}</source>
						<target>${maven.compiler.target}</target>
						<encoding>UTF-8</encoding>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.1.0</version>

					<executions>
						<execution>
							<goals>
								<goal>test-jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.2.1</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar-no-fork</goal>
								<goal>test-jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.0.0</version>
					<configuration>
						<doclint>none</doclint>
						<show>private</show>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
								<goal>test-jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- JaCoCo coverage reports -->
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.7.9</version>
					<executions>
						<execution>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>generate-code-coverage-report</id>
							<phase>test</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<!-- Generate a badge from a unified JaCoCo report -->
				<plugin>
					<groupId>com.sigpwned</groupId>
					<artifactId>jacoco-badge-maven-plugin</artifactId>
					<version>0.1.4</version>
					<executions>
						<execution>
							<id>generate-jacoco-badge</id>
							<phase>test</phase>
							<goals>
								<goal>badge</goal>
							</goals>
							<configuration>
								<passing>70</passing>
								<metric>instruction</metric>
								<reportFile>${project.reporting.outputDirectory}/jacoco/jacoco.csv</reportFile>
								<badgeFile>${project.build.directory}/jacoco.svg</badgeFile>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.7.1</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<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>false</autoReleaseAfterClose>
				</configuration>
			</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>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<doclint>none</doclint>
					<show>private</show>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<dependencyManagement>
		<dependencies>
			<!--
				YOP uses the org.reflections library to :
				- Find all the Yopable objects in a package when you want to generates Tables
				- Find a relation interface implementation that is not known (i.e. not List, Set, Queue, Collection)
				If you don't need these, you can safely exclude this dependency.
			 -->
			<dependency>
				<groupId>org.reflections</groupId>
				<artifactId>reflections</artifactId>
				<version>0.9.9-RC2</version>
				<exclusions>
					<exclusion>
						<groupId>com.google.guava</groupId>
						<artifactId>guava</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<!-- Servlet API -->
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>3.1.0</version>
			</dependency>

			<!-- Apache commons -->
			<dependency>
				<groupId>commons-lang</groupId>
				<artifactId>commons-lang</artifactId>
				<version>2.6</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.7</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.4</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-collections4</artifactId>
				<version>4.2</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-exec</artifactId>
				<version>1.3</version>
			</dependency>

			<!-- Google guava & gson -->
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>23.0</version>
			</dependency>
			<dependency>
				<groupId>com.google.code.gson</groupId>
				<artifactId>gson</artifactId>
				<version>2.8.2</version>
			</dependency>

			<!-- XStream : XML serialization/deserialization without annotation-->
			<dependency>
				<groupId>com.thoughtworks.xstream</groupId>
				<artifactId>xstream</artifactId>
				<version>1.4.11.1</version>
			</dependency>

			<!-- Logging -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
				<scope>test</scope>

				<exclusions>
					<exclusion>
						<groupId>org.slf4j</groupId>
						<artifactId>slf4j-api</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<!-- Test dependencies : JUnit -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.skyscreamer</groupId>
				<artifactId>jsonassert</artifactId>
				<version>1.5.0</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
</project>