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

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.metsci.glimpse</groupId>
    <artifactId>glimpse-parent</artifactId>
    <version>2.3.0</version>
    <packaging>pom</packaging>

    <name>Glimpse</name>
    <description>Glimpse is a library for building dynamic, interactive Java applications for visualizing Big Data.</description>
    <url>http://glimpse.metsci.com/</url>
    <licenses>
        <license>
            <name>The BSD 3-Clause License</name>
            <url>http://glimpse.metsci.com/licenses/glimpse-license.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git@github.com:metsci/glimpse.git</connection>
        <developerConnection>scm:git:git@github.com:metsci/glimpse.git</developerConnection>
        <url>git@github.com:metsci/glimpse.git</url>
    </scm>
    <organization>
        <name>Metron, Inc.</name>
        <url>http://www.metsci.com</url>
    </organization>
    <developers>
        <developer>
            <id>ulman</id>
            <name>Geoff Ulman</name>
            <email>ulman@metsci.com</email>
        </developer>
        <developer>
            <id>osborn</id>
            <name>Bryan Osborn</name>
            <email>osborn@metsci.com</email>
        </developer>
        <developer>
            <id>hogye</id>
            <name>Mike Hogye</name>
            <email>hogye@metsci.com</email>
        </developer>
    </developers>

    <modules>

        <module>util</module>

        <module>platform-fixes</module>

        <module>core</module>
        <module>core-examples</module>

        <module>docking</module>
        <module>docking-examples</module>

        <module>extras-charts</module>
        <module>extras-dspl</module>
        <module>extras-spacenav</module>
        <module>extras-swt</module>
        <module>extras-examples</module>
        <module>extras-worldwind</module>

    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>

            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                 <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
                <executions>
                    <execution>
                        <id>deploy</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <show>public</show>
                            <maxmemory>2056m</maxmemory>
                            <doctitle>Glimpse Data Visualization Library</doctitle>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- sign deployed maven artifacts -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- add the current commit SHA to the build jar -->
            <plugin>
                <groupId>com.github.koraktor</groupId>
                <artifactId>mavanagaiata</artifactId>
                <version>0.5.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>commit</goal>
                        </goals>
                        <configuration>
                            <skipNoGit>true</skipNoGit>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestEntries>
                            <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                            <SCM-Revision>${mvngit.commit.id}</SCM-Revision>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <basedir>${basedir}</basedir>
                    <header>${basedir}/LICENSE</header>
                    <quiet>false</quiet>
                    <strictCheck>true</strictCheck>
                    <failIfMissing>false</failIfMissing>
                    <aggregate>true</aggregate>
                    <includes>
                        <include>src/main/java/**</include>
                    </includes>
                    <mapping>
                        <!-- using JAVADOC_STYLE can sometimes cause the 
                            license header to find its way into the javadocs, so SLASHSTAR_STYLE is used -->
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <excludes>
                        <exclude>target/**</exclude>
                        <!-- don't put license header on package descriptions. 
                            If no other javadoc is provided, the first line of the license header ends 
                            up in the javadoc. -->
                        <exclude>**/package-info.java</exclude>
                        <!-- these classes have their own license headers -->
                        <exclude>**/charts/bathy/Conrec.java</exclude>
                        <exclude>**/charts/bathy/Render.java</exclude>
                        <exclude>**/CsvTokenizer.java</exclude>
                        <exclude>**/GenericSorting.java</exclude>
                        <exclude>**/AttributedTextRenderer.java</exclude>
                        <exclude>**/MD5Checksum.java</exclude>
                        <exclude>**/TextureAtlas.java</exclude>
                        <exclude>**/ElevatedSurfaceTileRenderer.java</exclude>
                        <exclude>**/ElevatedSectorGeometryList.java</exclude>
                    </excludes>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <useDefaultMapping>true</useDefaultMapping>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <!-- explicitly define maven-deploy-plugin after other to 
                    force exec order -->
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.7</version>
                <executions>
                    <execution>
                        <id>deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <!-- explicitly define maven-install-plugin after other to 
                    force exec order -->
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3.1</version>
                <executions>
                    <execution>
                        <id>install</id>
                        <phase>install</phase>
                        <goals>
                            <goal>install</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse 
                    m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <versionRange>[2.1,)</versionRange>
                                        <goals>
                                            <goal>resolve</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>com.github.koraktor</groupId>
                                        <artifactId>mavanagaiata</artifactId>
                                        <versionRange>[0.5.0,)</versionRange>
                                        <goals>
                                            <goal>commit</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute />
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-javadoc-plugin</artifactId>
                                        <versionRange>[2.9.1,)</versionRange>
                                        <goals>
                                            <goal>jar</goal>
                                            <goal>javadoc</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-enforcer-plugin</artifactId>
                                        <versionRange>[1.0.0,)</versionRange>
                                        <goals>
                                            <goal>enforce</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.1</version>
            </extension>
        </extensions>
    </build>

    <profiles>
        <profile>
            <id>release</id>
        </profile>
        <profile>
            <id>internal</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <distributionManagement>
                <repository>
                    <id>metron-maven-server</id>
                    <url>${release-deployment-url}</url>
                </repository>
                <snapshotRepository>
                    <id>metron-maven-server</id>
                    <url>${snapshot-deployment-url}</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <!-- don't sign for internal releases -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- don't javadoc for internal releases -->
		    <plugin>
			<artifactId>maven-javadoc-plugin</artifactId>
                      <executions>
                            <execution>
                                <id>deploy</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
		    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>glimpse.metsci.com</id>
            <distributionManagement>
                <repository>
                    <id>metron-maven-server</id>
                    <url>${glimpse-release-deployment-url}</url>
                </repository>
                <snapshotRepository>
                    <id>metron-maven-server</id>
                    <url>${glimpse-snapshot-deployment-url}</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>

</project>
