<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.googlecode.blaisemath</groupId>
    <artifactId>blaise-graph-theory-ui</artifactId>
    <version>4.0.4</version>
    <packaging>jar</packaging>
    
    <name>blaise-graph-theory-ui</name>
    <description>Swing UI components for blaise-graph-theory.</description>
    <url>http://blaisemath.googlecode.com</url>
    <inceptionYear>2009</inceptionYear>
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>Elisha Peterson</name>
            <email>triathematician+blaise@gmail.com</email>
            <url>https://github.com/triathematician</url>
            <organization>NA</organization>
            <organizationUrl>NA</organizationUrl>
        </developer>
    </developers>
    
    <scm>
        <url>https://github.com/triathematician/blaisemath</url>
        <connection>scm:git:git://github.com/triathematician/blaisemath.git</connection>
        <developerConnection>scm:git:git@github.com:triathematician/blaisemath.git</developerConnection>
      <tag>blaise-graph-theory-ui-4.0.4</tag>
  </scm>    
    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/triathematician/blaisemath/issues</url>
    </issueManagement>
    <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>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- set license attributes for license plugin -->
        <license.organizationName>Elisha Peterson</license.organizationName>
        <license.licenseName>apache_v2</license.licenseName>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>blaise-graph-theory</artifactId>
            <version>4.0.5</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>blaise-graphics-ui</artifactId>
            <version>3.0.8</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>blaise-app</artifactId>
            <version>0.2.0-beta</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.googlecode.blaisemath</groupId>
                    <artifactId>firestarter</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jnlp</groupId>
                    <artifactId>jnlp</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <!-- set minimum constraints on build environment -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M2</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.0.5</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>11</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- set sources and targets to Java 11 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>

            <!-- Automatically update file headers, and add license file to distribution -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.20</version>
                <configuration>
                    <roots>
                        <root>src/main/java</root>
                        <root>src/test</root>
                    </roots>
                    <canUpdateCopyright>true</canUpdateCopyright>
                    <sectionDelimiter>--</sectionDelimiter>
                    <excludes>
                        <exclude>**/com/google/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>update-project-license</goal>
                            <goal>update-file-header</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <!-- override to customize release plugin options -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <executions>
                    <execution>
                        <id>default</id>
                        <goals>
                            <goal>perform</goal>
                        </goals>
                        <configuration>
                            <pomFileName>${project.name}/pom.xml</pomFileName>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <profiles>
        <profile>
            <!-- this is for building sources & javadocs, signing, & deploying to staging repo -->
            <id>release</id>
            <build>
                <plugins>
                    <!-- build sources -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
            
                    <!-- build javadocs -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.1.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
            
                    <!-- sign the artifacts with gpg (requires command-line utility) -->
                    <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>
         
                    <!-- deploy to staging repo -->   
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>



