<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.eclipse.nebula.widgets.nattable</groupId>
	<artifactId>parent</artifactId>
	<version>2.0.2</version>

	<packaging>pom</packaging>

	<name>Nebula NatTable</name>
	<description>A powerful and flexible SWT table/grid widget that is built to handle very large data sets, real-time updates, dynamic styling, and more.</description>
	<url>https://projects.eclipse.org/projects/technology.nebula.nattable</url>
    
    <licenses>
        <license>
            <name>Eclipse Public License - v 2.0</name>
            <url>https://www.eclipse.org/legal/epl-2.0/</url>
        </license>
    </licenses>

	<developers>
    	<developer>
			<name>Dirk Fauth</name>
			<email>dirk.fauth@googlemail.com</email>
		</developer>
	</developers>
  
    <scm>
        <connection>scm:git:git://git.eclipse.org/gitroot/nattable/org.eclipse.nebula.widgets.nattable.git</connection>
        <developerConnection>scm:git:https://git.eclipse.org/r/nattable/org.eclipse.nebula.widgets.nattable.git</developerConnection>
        <url>https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/</url>
    </scm>

	<modules>
		<module>target-platform</module>

		<module>org.eclipse.nebula.widgets.nattable.core</module>
		<module>org.eclipse.nebula.widgets.nattable.core.test</module>
		<module>org.eclipse.nebula.widgets.nattable.core.feature</module>
		<module>org.eclipse.nebula.widgets.nattable.core.source.feature</module>

		<module>org.eclipse.nebula.widgets.nattable.extension.e4</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.e4.feature</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.e4.source.feature</module>

		<module>org.eclipse.nebula.widgets.nattable.extension.glazedlists</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.glazedlists.test</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.glazedlists.source.feature</module>

		<module>org.eclipse.nebula.widgets.nattable.extension.nebula</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.nebula.feature</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.nebula.source.feature</module>

		<module>org.eclipse.nebula.widgets.nattable.extension.poi</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.poi.feature</module>
		<module>org.eclipse.nebula.widgets.nattable.extension.poi.source.feature</module>

		<module>org.eclipse.nebula.widgets.nattable.updatesite</module>

		<module>org.eclipse.nebula.widgets.nattable.dataset</module>
		<module>org.eclipse.nebula.widgets.nattable.examples</module>
		<module>org.eclipse.nebula.widgets.nattable.examples.e4</module>
		<module>org.eclipse.nebula.widgets.nattable.examples.e4.feature</module>
		<module>org.eclipse.nebula.widgets.nattable.examples.e4.product</module>
		<module>org.eclipse.nebula.widgets.nattable.examples.e4.rcp.feature</module>
	</modules>

	<properties>
		<tycho-version>2.0.0</tycho-version>
        <cbi-version>1.3.2</cbi-version>
        <nattable-version>${project.version}</nattable-version>
		
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>

		<jacoco.version>0.8.5</jacoco.version>
		<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../org.eclipse.nebula.widgets.nattable.updatesite/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
		<sonar.surefire.reportsPath>${project.basedir}/../${project.artifactId}.test/target/surefire-reports/</sonar.surefire.reportsPath>
		<sonar.java.source>8</sonar.java.source>
		<!-- coverage exclusions -->
<!--
		<sonar.coverage.exclusions>
			org.eclipse.nebula.widgets.nattable.core.test/**/*.java,
			org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/**/*.java,
			org.eclipse.nebula.widgets.nattable.examples/**/*.java,
			org.eclipse.nebula.widgets.nattable.examples.e4/**/*.java,
			org.eclipse.nebula.widgets.nattable.dataset/**/*.java
		</sonar.coverage.exclusions>
-->
		<!-- duplication exclusion -->
<!--
		<sonar.cpd.exclusions>
			org.eclipse.nebula.widgets.nattable.core.test/**/*.java,
			org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/**/*.java,
			org.eclipse.nebula.widgets.nattable.examples/**/*.java,
			org.eclipse.nebula.widgets.nattable.examples.e4/**/*.java,
			org.eclipse.nebula.widgets.nattable.dataset/**/*.java
		</sonar.cpd.exclusions>
-->

		<sonar.exclusions>
			org.eclipse.nebula.widgets.nattable.core.test/**/*.java,
			org.eclipse.nebula.widgets.nattable.extension.glazedlists.test/**/*.java,
			org.eclipse.nebula.widgets.nattable.examples/**/*.java,
			org.eclipse.nebula.widgets.nattable.examples.e4/**/*.java,
			org.eclipse.nebula.widgets.nattable.dataset/**/*.java,
			**/.polyglot.*
		</sonar.exclusions>
	</properties>

    <pluginRepositories>
        <pluginRepository>
            <id>cbi</id>
            <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
        </pluginRepository>
	    <pluginRepository>
            <id>cbi-snapshots</id>
            <url>https://repo.eclipse.org/content/repositories/cbi-snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    
	<build>
		<plugins>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<version>${tycho-version}</version>
				<extensions>true</extensions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>target-platform-configuration</artifactId>
				<version>${tycho-version}</version>
				<configuration>
					<target>
						<artifact>
							<groupId>org.eclipse.nebula.widgets.nattable</groupId>
							<artifactId>target-platform</artifactId>
							<version>${nattable-version}</version>
						</artifact>
					</target>
					<targetDefinitionIncludeSource>honor</targetDefinitionIncludeSource>
					<environments>
						<environment>
							<os>win32</os>
							<ws>win32</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>linux</os>
							<ws>gtk</ws>
							<arch>x86_64</arch>
						</environment>
						<environment>
							<os>macosx</os>
							<ws>cocoa</ws>
							<arch>x86_64</arch>
						</environment>
					</environments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-source-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<id>plugin-source</id>
						<goals>
							<goal>plugin-source</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.4.1</version>
					<configuration>
						<encoding>ISO-8859-1</encoding>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.0</version>
					<configuration>
						<tags>
							<tag>
								<name>noextend</name>
								<placement>a</placement>
								<head>noextend:</head>
							</tag>
							<tag>
								<name>noinstantiate</name>
								<placement>a</placement>
								<head>noinstantiate:</head>
							</tag>
							<tag>
								<name>noimplement</name>
								<placement>a</placement>
								<head>noimplement:</head>
							</tag>
						</tags>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco.version}</version>
				</plugin>
				
                <plugin> 
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
			</plugins>
		</pluginManagement>
	</build>

    <profiles>
        <!-- The profile to execute the Sonar analysis -->
        <profile>
            <id>sonar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>

                        <configuration>
                            <sessionId>${project.artifactId}</sessionId>
                        </configuration>

                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
		
		<!-- The profile to sign the artifacts with the Eclipse signature -->
        <profile>
            <id>sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.eclipse.cbi.maven.plugins</groupId>
                        <artifactId>eclipse-jarsigner-plugin</artifactId>
                        <version>${cbi-version}</version>
                        <executions>
                            <execution>
                                <id>sign</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- The profile for publishing to repo.eclipse.org -->
        <profile>
            <id>eclipse-nexus-publish</id>

			<distributionManagement>
			    <repository>
			      <id>repo.eclipse.org</id>
			      <name>NatTable Repository - Releases</name>
			      <url>https://repo.eclipse.org/content/repositories/nattable-releases/</url>
			    </repository>
			    <snapshotRepository>
			      <id>repo.eclipse.org</id>
			      <name>NatTable Repository - Snapshots</name>
			      <url>https://repo.eclipse.org/content/repositories/nattable-snapshots/</url>
			    </snapshotRepository>
			</distributionManagement>
        </profile>
        
        <!-- The profiles for publishing to Maven Central -->
        <profile>
          <id>skip-deploy</id>
          <activation>
            <file>
              <missing>pom.xml</missing>
            </file>
          </activation>
          <properties>
            <maven.deploy.skip>true</maven.deploy.skip>
          </properties>
        </profile>
        
        <profile>
            <id>maven-publish</id>

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