<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>de.dentrassi.maven</groupId>
	<artifactId>osgi-dp</artifactId>
	<version>0.3.0</version>

	<packaging>maven-plugin</packaging>

	<name>OSGi distribution package builder</name>
	<description>Build OSGi distribution packages from Tycho features</description>

	<url>https://ctron.github.io/osgi-dp</url>

	<inceptionYear>2016</inceptionYear>

	<developers>
		<developer>
			<id>ctron</id>
			<name>Jens Reimann</name>
			<email>jreimann@redhat.com</email>
			<url>https://dentrassi.de</url>
			<organization>Red Hat Inc</organization>
			<organizationUrl>http://redhat.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/ctron/osgi-dp</url>
		<connection>scm:git:git://github.com/ctron/osgi-dp.git</connection>
		<developerConnection>scm:git:git@github.com:ctron/osgi-dp.git</developerConnection>
	  <tag>osgi-dp-0.3.0</tag>
  </scm>

	<issueManagement>
		<url>https://github.com/ctron/osgi-dp/issues</url>
		<system>GitHub</system>
	</issueManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.version>3.2.5</maven.version>
	</properties>

	<prerequisites>
		<maven>3.3</maven>
	</prerequisites>

	<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>Eclipse Public License - v 1.0</name>
			<distribution>repo</distribution>
			<url>https://www.eclipse.org/legal/epl-v10.html</url>
		</license>
	</licenses>

	<dependencies>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-model</artifactId>
			<version>${maven.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<version>${maven.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
			<version>${maven.version}</version>
		</dependency>
		
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>3.4</version>
			<scope>provided</scope>
		</dependency>
		
		<dependency>
			<groupId>org.eclipse.tycho</groupId>
			<artifactId>tycho-p2-plugin</artifactId>
			<version>0.25.0</version>
			<type>maven-plugin</type>
		</dependency>

		<!-- EOTD -->

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.5</version>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>

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

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.3</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.plexus</groupId>
					<artifactId>plexus-component-metadata</artifactId>
					<version>1.6</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
				</plugin>

				<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-site-plugin</artifactId>
					<version>3.5.1</version>
					<configuration>
						<!-- <relativizeDecorationLinks>false</relativizeDecorationLinks> -->
						<reportPlugins>
							<plugin>
								<groupId>org.apache.maven.plugins</groupId>
								<artifactId>maven-plugin-plugin</artifactId>
								<configuration>
									<requirements>
										<maven>3.3</maven>
									</requirements>
								</configuration>
							</plugin>
							<plugin>
								<groupId>org.apache.maven.plugins</groupId>
								<artifactId>maven-project-info-reports-plugin</artifactId>
							</plugin>
							<plugin>
								<groupId>org.apache.maven.plugins</groupId>
								<artifactId>maven-javadoc-plugin</artifactId>
								<reportSets>
									<reportSet>
										<reports>
											<report>javadoc</report>
										</reports>
									</reportSet>
								</reportSets>
							</plugin>
						</reportPlugins>
					</configuration>

					<dependencies>
						<dependency>
							<groupId>org.apache.maven.wagon</groupId>
							<artifactId>wagon-ssh</artifactId>
							<version>2.10</version>
						</dependency>
					</dependencies>

				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-invoker-plugin</artifactId>
					<version>2.0.0</version>
				</plugin>

				<plugin>
					<groupId>com.github.github</groupId>
					<artifactId>site-maven-plugin</artifactId>
					<version>0.12</version>
				</plugin>
				
	            <plugin>
	                <groupId>org.apache.maven.plugins</groupId>
	                <artifactId>maven-enforcer-plugin</artifactId>
	                <version>1.4.1</version>
	            </plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.codehaus.plexus</groupId>
				<artifactId>plexus-component-metadata</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>generate-metadata</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<configuration>
					<goalPrefix>osgi-dp</goalPrefix>
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>mojo-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
					<execution>
						<id>help-goal</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<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-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
				    <execution>
				        <id>enforce-java</id>
				        <goals>
				            <goal>enforce</goal>
				        </goals>
				        <configuration>
				            <rules>
				                <requireJavaVersion>
				                    <version>1.8.0</version>
				                </requireJavaVersion>
				            </rules>
				        </configuration>
				    </execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<linksource>true</linksource>
					<links>
						<link>http://docs.oracle.com/javase/8/docs/api</link>
					</links>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<profiles>

		<profile>
			<id>release</id>
			<build>
				<plugins>
					<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>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>its</id>
			<activation>
				<property>
					<name>skipTests</name>
					<value>!true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-invoker-plugin</artifactId>
						<configuration>
							<debug>true</debug>
							<projectsDirectory>src/it</projectsDirectory>
							<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
							<preBuildHookScript>setup</preBuildHookScript>
							<postBuildHookScript>verify</postBuildHookScript>
							<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
							<pomIncludes>
								<pomInclude>*/pom.xml</pomInclude>
							</pomIncludes>
							<extraArtifacts>
								<extraArtifact>ch.qos.logback:logback-classic:1.1.7</extraArtifact>
							</extraArtifacts>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>install</goal>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>

		</profile>

		<profile>
			<id>pages</id>

			<properties>
				<github.global.server>github</github.global.server>
			</properties>

			<build>
				<plugins>
					<plugin>
						<groupId>com.github.github</groupId>
						<artifactId>site-maven-plugin</artifactId>
						<configuration>
							<message>Creating site for ${project.version}</message>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>site</goal>
								</goals>
								<phase>site</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>

		</profile>
	</profiles>

</project>