<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.github.demidenko05</groupId>
  <artifactId>a-jetty-all</artifactId>
  <version>1.0.4</version>
  <packaging>pom</packaging>
  <inceptionYear>2016</inceptionYear>

  <name>A-Jetty is Jetty 9.2 adapted for Android.</name>  
  <description>A-Jetty is Jetty 9.2 adapted for Android, it can run precompiled JSP/JSTL.</description>
  <url>https://sites.google.com/site/beigesoftware</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.7</java.version>
  </properties>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.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.2</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.simpligility.maven.plugins</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>4.5.0</version>
            <inherited>true</inherited>
            <configuration>
              <sign>
                <debug>false</debug>
              </sign>
              <zipalign>
                <verbose>true</verbose>
                <inputApk>${project.build.directory}${file.separator}${project.artifactId}.apk</inputApk>
                <outputApk>${project.build.directory}${file.separator}${project.artifactId}-sa.apk</outputApk>
                <skip>false</skip>  
              </zipalign>
            </configuration>
            <executions>
              <execution>
                <id>alignApk</id>
                <phase>verify</phase>
                <goals>
                  <goal>zipalign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>  
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
            <executions>
              <execution>
                <id>remove-unaligned-apk</id>
                <phase>verify</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <delete file="${project.build.directory}${file.separator}${project.artifactId}.apk" />
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jarsigner-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>signing</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>package</phase>
                <inherited>true</inherited>
                <configuration>
                  <archiveDirectory />
                  <includes>
                    <include>target${file.separator}*.apk</include>
                    <include>target${file.separator}*.jar</include>
                  </includes>
                  <storepass>${signpass}</storepass>
                  <keypass>${signpass}</keypass>
                  <alias>${signalias}</alias>
                </configuration>
              </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>
                <configuration>
                  <keyname>${gpgkeyname}</keyname>
                  <passphraseServerId>${gpgkeyname}</passphraseServerId>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>check</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>2.17</version>
            <executions>
              <execution>
              <id>checkstyle</id>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
              </execution>
            </executions>
            <configuration>
              <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
              <excludes>**/R.java,**/BuildConfig.java,**/apache/**,**/eclipse/**</excludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
            <version>3.0.3</version>
            <configuration>
              <excludeFilterFile>findbug-exclude.xml</excludeFilterFile>
            </configuration>
            <executions>
              <execution>
              <id>findbugs</id>
              <phase>compile</phase>
              <goals>
                <goal>check</goal>
              </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>3.6</version>
            <configuration>
              <printFailingErrors>true</printFailingErrors>
              <excludes>
                <exclude>**/eclipse/**</exclude>
                <exclude>**/apache/**</exclude>
                <!--Rule:AvoidUsingHardCodedIP is wrong-->
                <exclude>org/beigesoft/ajetty/crypto/CryptoService.java</exclude>
                <exclude>org/beigesoft/ajetty/BootStrap.java</exclude>
                <exclude>org/beigesoft/ajetty/BootStrapEmbeddedHttps.java</exclude>
                <exclude>org/beigesoft/ajetty/BootStrapEmbeddedHttpsSwing.java</exclude>
              </excludes>
            </configuration>
            <executions>
              <execution>
              <id>pmd</id>
              <phase>compile</phase>
              <goals>
                <goal>check</goal>
              </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>4.10</version>
     <scope>test</scope>
    </dependency>
  </dependencies>
  
  <reporting>
    <plugins>
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
         <version>3.4</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.5</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.6</version>
        <configuration>
          <excludes>**/eclipse/**</excludes>
                <!--Rule:AvoidUsingHardCodedIP is wrong-->
          <exclude>org/beigesoft/ajetty/BootStrap.java</exclude>
         </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
          <excludes>**/R.java,**/BuildConfig.java,**/eclipse/**</excludes>
         </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.3</version>
        <configuration>
          <excludeFilterFile>findbug-exclude.xml</excludeFilterFile>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
  
  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <useFile>false</useFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <compilerArgs>
            <!--<arg>-verbose</arg>-->
            <arg>-Xlint:all,-options,-path</arg>
          </compilerArgs>
        </configuration>
      </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-assembly-plugin</artifactId>
        <version>3.0.0</version>
        <inherited>false</inherited>
        <configuration>
          <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
          <descriptors>
            <descriptor>assembly.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <developers>
    <developer><name>Aki Yoshida</name></developer>
    <developer><name>Greg Wilkins</name></developer>
    <developer><name>Yury Demidenko</name></developer>
  </developers>

  <licenses>
    <license>
      <name>The Eclipse Public License, Version 1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
      <distribution>repo</distribution>
    </license>
    <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>
    <license>
      <name>GNU General Public License version 2</name>
      <url>http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <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>
  
  <scm>
    <url>https://github.com/demidenko05/a-jetty-all.git</url>
    <connection>scm:git:git@github.com:demidenko05/a-jetty-all.git</connection>
    <developerConnection>scm:git:git@github.com:demidenko05/a-jetty-all.git</developerConnection>
    <tag>a-jetty-all-1.0.4</tag>
  </scm>

  <modules>
    <module>a-jetty-base</module>
    <module>a-jetty-swing</module>
    <module>a-jetty</module>
  </modules>
  
</project>
