<?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>io.ejs</groupId>
    <artifactId>stick</artifactId>
    <version>0.4.0</version>

    <packaging>jar</packaging>

    <name>Stick</name>

    <description>
        A JavaScript web application framework built upon rake-style middleware components. This
        project is maintained by ejs.io in order to place Stick in the Central Maven repository.
    </description>

    <prerequisites>
        <maven>3.0.4</maven>
    </prerequisites>

    <url>https://github.com/Transcordia/stick</url>

    <scm>
        <connection>scm:git:git@github.com:Transcordia/stick.git</connection>
        <developerConnection>scm:git:git@github.com:Transcordia/stick.git</developerConnection>
        <url>git@github.com:Transcordia/stick.git</url>
    </scm>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>hns</id>
            <name>Hannes Wallnöfer</name>
            <url>http://github.com/ringo/ringojs/commits/master?author=hns</url>
            <roles>
                <role>Project Manager</role>
            </roles>
        </developer>
        <developer>
            <id>oberhamsi</id>
            <name>Simon Oberhammer</name>
            <url>http://github.com/ringo/ringojs/commits/master?author=oberhamsi</url>
        </developer>
        <developer>
            <id>robi42</id>
            <name>Robert Thurnher</name>
            <url>http://github.com/ringo/ringojs/commits/master?author=robi42</url>
        </developer>
        <developer>
            <id>rrmckinley</id>
            <name>rrmckinley</name>
            <url>http://github.com/ringo/ringojs/commits/master?author=rrmckinley</url>
        </developer>
        <developer>
            <id>oravecz</id>
            <name>Jim Cook</name>
            <url>http://github.com/ringo/ringojs/commits/master?author=oravecz</url>
        </developer>
    </developers>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/ringo/stick/issues</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

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

    <dependencies>
        <dependency>
            <groupId>io.ejs</groupId>
            <artifactId>ringojs</artifactId>
            <version>0.11.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <targetPath>${project.build.outputDirectory}/stick</targetPath>
                <directory>${project.basedir}</directory>
                <includes>
                    <include>lib/**</include>
                    <include>LICENSE</include>
                    <include>package.json</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <configuration>
                            <target unless="maven.test.skip">
                                <java classname="org.ringojs.tools.launcher.Main" fork="true" failonerror="yes">
                                    <jvmarg value="-Dringo.home=src/main/webapp/WEB-INF" />
                                    <jvmarg value="-Dringo.module-path=app" />
                                    <jvmarg value="-Dringo.classpath=" />
                                    <jvmarg value="-Dringo.verbose=true" />
                                    <arg value="test/stick_test.js" />
                                    <classpath refid="maven.test.classpath" />
                                </java>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>external.atlassian.jgitflow</groupId>
                <artifactId>jgitflow-maven-plugin</artifactId>
                <version>1.0-m4.3</version>
                <configuration>
                    
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <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>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.5</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

</project>
