<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

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

    <groupId>com.opower</groupId>
    <artifactId>opower-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.0.0</version>
    <name>Opower Parent Project</name>
    <description>Parent POM for all Opower artifacts</description>
    <url>http://opower.com/</url>

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

    <licenses>
        <license>
            <name>The MIT License</name>
            <url>http://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Tom Vaughan</name>
            <email>tom@opower.com</email>
            <organization>opower</organization>
        </developer>
        <developer>
            <name>Release Engineering</name>
            <email>re@opower.com</email>
            <organization>opower</organization>
        </developer>
    </developers>

    <properties>
        <default.encoding>UTF-8</default.encoding>
        <project.build.sourceEncoding>${default.encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${default.encoding}</project.reporting.outputEncoding>
        <version.cobertura>1.9.3</version.cobertura>
        <version.maven.assembly.plugin>2.2-beta-2</version.maven.assembly.plugin>
        <version.maven.clean.plugin>2.4.1</version.maven.clean.plugin>
        <version.maven.cobertura.plugin>2.3</version.maven.cobertura.plugin>
        <version.maven.compiler.plugin>3.1</version.maven.compiler.plugin>
        <version.maven.deploy.plugin>2.7</version.maven.deploy.plugin>
        <version.maven.exec.plugin>1.2</version.maven.exec.plugin>
        <version.maven.findbugs.plugin>2.4.0</version.maven.findbugs.plugin>
        <version.maven.gpg.plugin>1.4</version.maven.gpg.plugin>
        <version.maven.jar.plugin>2.3.2</version.maven.jar.plugin>
        <version.maven.javadoc.plugin>2.9.1</version.maven.javadoc.plugin>
        <version.maven.jxr.plugin>2.3</version.maven.jxr.plugin>
        <version.maven.pmd.plugin>2.7.1</version.maven.pmd.plugin>
        <version.maven.release.plugin>2.4.2</version.maven.release.plugin>
        <version.maven.resources.plugin>2.5</version.maven.resources.plugin>
        <version.maven.shade.plugin>1.4</version.maven.shade.plugin>
        <version.maven.site.plugin>3.0</version.maven.site.plugin>
        <version.maven.source.plugin>2.2.1</version.maven.source.plugin>
        <version.maven.surefire.plugin>2.16</version.maven.surefire.plugin>
        
        <version.java>1.7</version.java>
        <version.jetty>8.1.8.v20121106</version.jetty>

        <!-- Shared libraries should have opower.checkstyle.checks set to "libs".
             All other artifacts should be using "main".
        -->
        <opower.checkstyle.checks>main</opower.checkstyle.checks>
        <opower.checkstyle.test.checks>main-tests</opower.checkstyle.test.checks>
    </properties>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${version.maven.cobertura.plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>${version.maven.jxr.plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${version.maven.pmd.plugin}</version>
                <configuration>
                    <targetJdk>${version.java}</targetJdk>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${version.maven.findbugs.plugin}</version>
            </plugin>
        </plugins>
    </reporting>


    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version.maven.release.plugin}</version>
                    <configuration combine.self="override">
                        <!-- The '@' is not a typo; it's this plugin's delimiter -->
                        <!-- See http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html -->
                        <tagNameFormat>@{project.version}</tagNameFormat>
                        <!-- Invoke 'release' profile which skips tests -->
                        <goals>deploy -P release</goals>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.maven.surefire.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${version.maven.surefire.plugin}</version>  <!-- intentionally set to version.maven.surefire.plugin -->
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.maven.clean.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.maven.compiler.plugin}</version>
                    <configuration>
                        <source>${version.java}</source>
                        <target>${version.java}</target>
                        <compilerArgument>-Xlint:unchecked</compilerArgument>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.maven.jar.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.maven.javadoc.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.maven.deploy.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${version.maven.assembly.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${version.maven.shade.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.maven.source.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version.maven.site.plugin}</version>
                    <configuration>
                        <locales>en</locales>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${version.maven.pmd.plugin}</version>
                    <configuration>
                        <targetJdk>${version.java}</targetJdk>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.maven.resources.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>${version.maven.cobertura.plugin}</version>
                    <dependencies>
                        <dependency>
                            <groupId>net.sourceforge.cobertura</groupId>
                            <artifactId>cobertura</artifactId>
                            <version>${version.cobertura}</version>
                            <exclusions>
                                <exclusion>
                                    <groupId>commons-collections</groupId>
                                    <artifactId>commons-collections</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${version.maven.exec.plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-codegen-plugin</artifactId>
                    <version>${version.cxf}</version>
                </plugin>
                <plugin>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>jetty-maven-plugin</artifactId>
                    <version>${version.jetty}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-util</artifactId>
                <version>${version.jetty}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <!--
            Used only when invoking release:perform so we do not re-run tests as part of the deployment
            -->
            <id>release</id>
            <properties>
                <maven.test.skip.exec>true</maven.test.skip.exec>
                <jetty.skip>true</jetty.skip>
            </properties>
        </profile>
        <profile>
            <!-- 
            Used to configure our maven-release-plugin like Sonatype wants for releasing our opensource artifacts
            -->
            <id>release-opensource</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${version.maven.release.plugin}</version>
                        <configuration combine.self="override">
                            <mavenExecutorId>forked-path</mavenExecutorId>
                            <useReleaseProfile>false</useReleaseProfile>
                            <arguments>${arguments} -Psonatype-oss-release</arguments>
                            <tagNameFormat>@{project.version}</tagNameFormat>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.maven.gpg.plugin}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!--
    <repositories>
        DO NOT add repositories to this POM.  Repos are inherited from our sonatype parent.
        To deploy a SNAPSHOT of this artifact or do a release, you'll need the sonatype server ids
      in your ~/.m2/settings.xml, per these instructions: https://wiki.opower.com/display/PD/OpenSource+Hosting+with+Sonatype
    </repositories>
    -->

</project>
<!-- vim: set ts=4 sw=4 : -->
