<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>ci.intern.module.enterprise.web</groupId> -->
	<groupId>org.bitbucket.intenscom</groupId>
	<artifactId>components</artifactId>
	<version>1.0.0</version>

	<!-- Needed for Maven Central through Sonatype -->
	<name>${project.artifactId}</name>
	<description>${project.artifactId} ci module</description>
	<url>https://bitbucket.org/intenscom/${project.artifactId}/</url>
	<scm>
		<connection>scm:git:https://bitbucket.org/intenscom/${project.artifactId}</connection>
		<developerConnection>scm:git:https://bitbucket.org/intenscom/${project.artifactId}</developerConnection>
		<url>https://bitbucket.org/intenscom/${project.artifactId}.git</url>
	</scm>
	<developers>
		<developer></developer>
	</developers>
	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<dependencies>

		<!-- Contains basic dependencies for supporting Java Enterprise 7 development. -->
		<dependency>
			<groupId>org.bitbucket.intenscom</groupId>
			<artifactId>base</artifactId>
			<version>7.0.0</version>
			<type>pom</type>
		</dependency>

		<!-- Extensions for JSF 2.3.3 based components -->
		<dependency>
			<groupId>org.primefaces</groupId>
			<artifactId>primefaces</artifactId>
			<version>6.2</version>
		</dependency>

	</dependencies>

	<build>

		<plugins>

			<!-- Set up Eclipse project with full facets functionality -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.10</version>
				<configuration>
					<projectnatures>
						<projectnature>org.eclipse.m2e.core.maven2Nature</projectnature>
						<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
						<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
						<projectnature>org.jboss.tools.jst.web.kb.kbnature</projectnature>
						<projectnature>org.jboss.tools.jsf.jsfnature</projectnature>
					</projectnatures>
					<buildcommands>
						<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
						<buildcommand>org.jboss.tools.jst.web.kb.kbbuilder</buildcommand>
						<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
						<buildcommand>org.eclipse.m2e.core.maven2Builder</buildcommand>
					</buildcommands>
					<!-- FIXME: projectFacets? -->
					<additionalProjectFacets>
						<java>1.8</java>
						<jst.jsf>2.2</jst.jsf>
						<jst.web>3.1</jst.web>
					</additionalProjectFacets>
					<downloadJavadocs>true</downloadJavadocs>
					<downloadSources>true</downloadSources>
				</configuration>
			</plugin>

			<!-- Avoid deleting target directory itself. Needed when marking target directory as derived source. -->
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<excludeDefaultDirectories>true</excludeDefaultDirectories>
					<filesets>
						<fileset>
							<directory>target</directory>
							<includes>
								<include>**/*</include>
							</includes>
						</fileset>
					</filesets>
				</configuration>
			</plugin>

			<!-- Fetch common properties. This way, if for instance we want to change the Java version, it only needs to happen in this dependency -->
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
					<execution>
						<id>unpack</id>
						<phase>initialize</phase>
						<goals>
							<goal>unpack-dependencies</goal>
						</goals>
						<configuration>
							<includeGroupIds>org.bitbucket.intenscom</includeGroupIds>
							<includeArtifactIds>maven</includeArtifactIds>
							<excludeTransitive>true</excludeTransitive>
							<overWrite>true</overWrite>
							<outputDirectory>${project.build.directory}/maven-properties</outputDirectory>
							<excludes>META-INF/**</excludes>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
							<excludeTransitive>false</excludeTransitive>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Apply common properties to the maven project -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.0.0</version>
				<executions>
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>read-project-properties</goal>
						</goals>
						<configuration>
							<files>
								<file>${project.build.directory}/maven-properties/maven.properties</file>
							</files>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Skip generation of maven-archiver folder with pom.properties in the target folder, and no pom.xml or pom.properties in a nested META-INF folder in the final 
				jar. -->
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<executions>
					<execution>
						<id>default-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<archive>
								<addMavenDescriptor>false</addMavenDescriptor>
							</archive>
							<excludePomFiles>true</excludePomFiles>
						</configuration>
					</execution>
					<execution>
						<id>javadoc-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<classifier>javadoc</classifier>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<archive>
						<addMavenDescriptor>false</addMavenDescriptor>
					</archive>
					<excludePomFiles>true</excludePomFiles>
				</configuration>
			</plugin>

			<!-- Following plugins are needed for publishment to maven central -->
			<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>
						</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>

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

</project>