<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>

	<groupId>com.aleax.blight</groupId>
	<artifactId>blight-parent</artifactId>
	<version>1.0.2</version>
	<packaging>pom</packaging>

	<name>bLight parent</name>	
	<description>bLight is a minimalistic compile-time type-safe templating mechanism for use in Java applications.</description>
	<url>http://blight.aleax.com/</url>
    <inceptionYear>2018</inceptionYear>

    <licenses>
        <license>
            <name>LGPLv3</name>
            <url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
            <distribution>repo,manual</distribution>
            <comments>GNU Lesser General Public License</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Yiannis Paschalidis</name>
            <roles>
                <role>Project Admin</role>
                <role>Developer</role>
            </roles>
            <organization>GitHub</organization>
            <organizationUrl>https://github.com/yiannis-p</organizationUrl>
            <timezone>+10</timezone>
        </developer>
    </developers>

	<scm>
		<connection>scm:git:git://github.com/yiannis-p/bLight.git</connection>
		<developerConnection>scm:git:ssh://github.com:yiannis-p/bLight.git</developerConnection>
		<url>http://github.com/yiannis-p/bLight/</url>
	</scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

	<build>
	
		<plugins>			
			
			<!-- Generates a cut-down site for the distribution zip -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.4</version>
				<executions>
					<execution>
						<id>dist-site</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>site</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/target/dist-site</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.4</version>
 			</plugin>

			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.7</version>
				<executions>
					<execution>
						<id>dist-site-source-zips</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/target/dist-site</outputDirectory>
							<resources>
								<resource>
									<directory>blight-examples/target</directory>
									<includes>
										<include>*.zip</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>site-source-zips</id>
						<phase>site</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/target/site</outputDirectory>
							<resources>
								<resource>
									<directory>blight-examples/target</directory>
									<includes>
										<include>*.zip</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			
		</plugins>
		
		<pluginManagement>
			<plugins>
			
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.6.0</version>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>
				
			</plugins>
		</pluginManagement>
		
	</build>
	
	<dependencyManagement>
		<dependencies>
		
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
		
		</dependencies>
	</dependencyManagement>

	<profiles>
	
		<profile>
			<!-- For deployment to Maven Central -->
			<id>release</id>
			<activation>
				<property>
					<name>release</name>
					<value>true</value>
				</property>
			</activation>
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
			</distributionManagement>			
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.0.4</version>
						<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>
						<version>3.0.0</version>
						<executions>
							<execution>
								<phase>package</phase>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</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>
				
			</build>
		</profile>	
	
		<profile>
			<!-- 
				Unfortunately, the site plugin doesn't yet support per-execution configuration.
				We don't want to include all the project reports for the distribution, so the
				full site build must be run with -Dfull_site=true.
			-->
			<id>full_site</id>
			<activation>
				<property>
					<name>full_site</name>
					<value>true</value>
				</property>
			</activation>
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<version>2.9</version>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-report-plugin</artifactId>
						<version>2.20.1</version>
						<configuration>
							<aggregate>true</aggregate>
						</configuration>
					</plugin>
				</plugins>
			</reporting>
		</profile>
		
	</profiles>

	<modules>
		<module>blight-core</module>
		<module>blight-compiler</module>
		<module>blight-maven-plugin</module>
		<module>blight-ant-task</module>
		<!-- <module>blight-examples</module> -->
		<module>blight-dist</module>
	</modules>
	
</project>