<?xml version="1.0" encoding="UTF-8"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright Red Hat, Inc., and individual contributors

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<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.jboss.aerogear</groupId>
    <artifactId>aerogear-parent</artifactId>
    <packaging>pom</packaging>
    <version>0.2.2</version>
    <name>JBoss AeroGear</name>
    <description>
        Open Source Libraries for Mobile Connectivity
    </description>
    <url>http://aerogear.org</url>

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>11</version>
    </parent>

    <scm>
        <connection>scm:git:git://github.com/aerogear/aerogear-parent.git</connection>
        <developerConnection>scm:git:git@github.com:aerogear/aerogear-parent.git</developerConnection>
        <url>https://github.com/aerogear/aerogear-parent</url>
        <tag>0.2.2</tag>
    </scm>

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

    <issueManagement>
        <system>JIRA</system>
        <url>https://issues.jboss.org/browse/AEROGEAR</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>AeroGear List</name>
            <subscribe>aerogear-dev-subscribe@lists.jboss.org</subscribe>
            <unsubscribe>aerogear-dev-unsubscribe@lists.jboss.org</unsubscribe>
            <post>aerogear-dev@lists.jboss.org</post>
            <archive>http://lists.jboss.org/pipermail/aerogear-dev/</archive>
        </mailingList>
    </mailingLists>

    <developers>
        <developer>
            <id>aerogear</id>
            <name>AeroGear Team</name>
            <email>aerogear-dev@lists.jboss.org</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <aerogear-misc.version>0.1.2</aerogear-misc.version>
        <java-formatter.plugin.version>0.4</java-formatter.plugin.version>
        <license.plugin.version>1.9.0</license.plugin.version>
        <compiler.plugin.version>2.3.2</compiler.plugin.version>
        <release.plugin.version>2.4</release.plugin.version>

        <!-- AeroGear is compiled against and using JDK6 -->
        <maven.compiler.target>1.6</maven.compiler.target>
        <maven.compiler.source>1.6</maven.compiler.source>
    </properties>

    <repositories>
        <repository>
            <id>jboss-public-snapshot-repository-group</id>
            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>


    <modules>
        <module>aerogear-bom</module>
        <module>aerogear-android-bom</module>
        <module>aerogear-test-bom</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
                    <artifactId>maven-java-formatter-plugin</artifactId>
                    <version>${java-formatter.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <version>${license.plugin.version}</version>
                </plugin>
                <plugin>
                    <!-- Overrides version from jboss-parent -->
                    <!-- Since 3.0, the default compiler is javax.tools.JavaCompiler (if you
                         are using java 1.6) and is used to compile Java sources. If you want
                         to force the plugin using javac, you must configure the plugin option
                         <forceJavacCompilerUse>true</forceJavacCompilerUse>
                         or -Dmaven.compiler.forceJavacCompilerUse=true -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler.plugin.version}</version>
                </plugin>
                <plugin>
                    <!-- Overrides version from jboss-parent, which is 2.3.2-->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${release.plugin.version}</version>
                </plugin>
             </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
                <artifactId>maven-java-formatter-plugin</artifactId>
                <configuration>
                    <configFile>/eclipse-formatting.xml</configFile>
                    <lineEnding>LF</lineEnding>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jboss.aerogear</groupId>
                        <artifactId>aerogear-misc</artifactId>
                        <version>${aerogear-misc.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <header>/al_v2_license_header.txt</header>
                    <includes>
                        <include>src/**</include>
                        <include>test/**</include>
                    </includes>
                    <strictCheck>true</strictCheck>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jboss.aerogear</groupId>
                        <artifactId>aerogear-misc</artifactId>
                        <version>${aerogear-misc.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <configLocation>/checkstyle-rules.xml</configLocation>
                    <logViolationsToConsole>true</logViolationsToConsole>
                    <violationSeverity>error</violationSeverity>
                </configuration>
                <executions>
                    <execution>
                        <id>checkstyle-report</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.jboss.aerogear</groupId>
                        <artifactId>aerogear-misc</artifactId>
                        <version>${aerogear-misc.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>

