<?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.rogueware.mojo</groupId>
   <artifactId>gdrive-release-maven-plugin</artifactId>
   <version>1.2</version>
   <packaging>maven-plugin</packaging>
   
   <name>Google Drive Release Maven Plugin</name>
   <description>Google drive plugin allows artifact deployment to a GDrive</description>
   <url>https://bitbucket.org/jingram/gdrive-release-maven-plugin</url>
   
   <licenses>
      <license>
         <name>The Apache Software License, Version 2.0</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
         <distribution>repo</distribution>
      </license>
   </licenses>

   <scm>
      <url>https://bitbucket.org/jingram/gdrive-release-maven-plugin.git</url>
   </scm>

   <developers>
      <developer>
         <id>jingram</id>
         <name>Johnathan Ingram</name>
         <email>jingram@rogueware.org</email>
         <url>https://au.linkedin.com/in/johnathaningram</url>
         <organization>Rogueware.org</organization>
         <roles>
            <role>architect</role>
            <role>developer</role>
         </roles>
         <timezone>Australia/Adelaide</timezone>
      </developer>
   </developers> 
   
   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <maven.compiler.source>1.7</maven.compiler.source>
      <maven.compiler.target>1.7</maven.compiler.target>
   </properties>
    
   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>3.5</version>
            <configuration>
               <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
            </configuration>
            <executions>
               <execution>
                  <id>mojo-descriptor</id>
                  <phase>process-classes</phase>
                  <goals>
                     <goal>descriptor</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
   
   <dependencies>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-plugin-api</artifactId>
         <version>3.5.2</version>
      </dependency>    
              
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-project</artifactId>
         <version>2.2.1</version>
      </dependency>

      <!-- dependencies to annotations -->
      <dependency>
         <groupId>org.apache.maven.plugin-tools</groupId>
         <artifactId>maven-plugin-annotations</artifactId>
         <version>3.5</version>
         <scope>provided</scope>
      </dependency>

      <dependency>
         <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-provider-api</artifactId>
         <version>3.0.0</version>
      </dependency>


      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-interactivity-api</artifactId>
        <version>1.0-alpha-6</version>
      </dependency>

      <!-- Google API's -->
      <dependency>
         <groupId>com.google.api-client</groupId>
         <artifactId>google-api-client</artifactId>
         <version>1.23.0</version>
      </dependency>

      <dependency>
         <groupId>com.google.apis</groupId>
         <artifactId>google-api-services-drive</artifactId>
         <version>v3-rev56-1.22.0</version>
      </dependency>

      <dependency>
         <groupId>com.google.oauth-client</groupId>
         <artifactId>google-oauth-client-jetty</artifactId>
         <version>1.23.0</version>
      </dependency>
   </dependencies> 
    
    
   <profiles>
      <!-- OSSRH Release Profile 
           Define server for serverid oss.sonatype.org in settings.xml
           Required appropriate "non-public" profile entires in settings.xml

           Sign Only
           mvn clean verify -P sonatype-oss-release                 

           Sign and Deploy           
           mvn clean deploy -P sonatype-oss-release                 
      -->
      <profile>
         <id>sonatype-oss-release</id>      
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-source-plugin</artifactId>
                  <version>3.0.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-javadoc-plugin</artifactId>
                  <version>2.10.4</version>
                  <executions>
                     <execution>
                        <id>attach-javadocs</id>
                        <goals>
                           <goal>jar</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               
               <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 Phase -->
               <plugin>
                  <groupId>org.sonatype.plugins</groupId>
                  <artifactId>nexus-staging-maven-plugin</artifactId>
                  <version>1.6.8</version>
                  <extensions>true</extensions>
                  <configuration>
                     <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                     <serverId>oss.sonatype.org</serverId>
                     <autoReleaseAfterClose>true</autoReleaseAfterClose>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
    
</project>
