<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://maven.apache.org/POM/4.0.0">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.crashnote</groupId>
    <artifactId>crashnote-appengine</artifactId>
    <version>0.2</version>
    <packaging>jar</packaging>

    <name>Crashnote Appengine Notifier</name>
    <description>
        Reports exceptions from Java apps on Appengine to crashnote.com
    </description>

    <url>http://www.crashnote.com</url>
    <inceptionYear>2011</inceptionYear>

    <organization>
        <name>101 Loops</name>
        <url>http://www.101loops.com</url>
    </organization>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>http://github.com/crashnote/crashnote-java</url>
        <connection>scm:git:https://github.com/crashnote/crashnote-java.git</connection>
        <developerConnection>
            scm:git:git@github.com:crashnote/crashnote-java.git
        </developerConnection>
    </scm>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/crashnote/crashnote-java/issues</url>
    </issueManagement>

    <parent>
        <groupId>com.crashnote</groupId>
        <artifactId>parent-notifier</artifactId>
        <version>0.2</version>
        <relativePath>../parents/notifier</relativePath>
    </parent>

    <dependencies>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>

        <!-- GOOGLE APPENGINE API -->
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-1.0-sdk</artifactId>
            <version>1.5.0</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <testSourceDirectory>src/test/scala</testSourceDirectory>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>develop</id>

            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <dependencies>
                <dependency>
                    <groupId>com.crashnote.module</groupId>
                    <artifactId>module-servlet</artifactId>
                    <version>0.2</version>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>production</id>

            <activation>
                <property>
                    <name>gpg.passphrase</name>
                </property>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <version>1.7</version>
                        <executions>
                            <!-- add module source files -->
                            <execution>
                                <id>add-sources</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>../modules/core/src/main/java</source>
                                        <source>../modules/logger/src/main/java</source>
                                        <source>../modules/servlet/src/main/java</source>
                                    </sources>
                                </configuration>
                            </execution>

                            <!-- add module conf files -->
                            <execution>
                                <id>add-resources</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>add-resource</goal>
                                </goals>
                                <configuration>
                                    <resources>
                                        <resource>
                                            <directory>
                                                ../modules/core/src/main/resources
                                            </directory>
                                            <targetPath>${build.directory}/classes</targetPath>
                                            <includes>
                                                <include>*.conf</include>
                                            </includes>
                                        </resource>
                                        <resource>
                                            <directory>
                                                ../modules/servlet/src/main/resources
                                            </directory>
                                            <targetPath>${build.directory}/classes</targetPath>
                                            <includes>
                                                <include>*.conf</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <client-name>cn-appengine</client-name>
    </properties>

</project>
