
<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>
    <groupId>com.wadpam.openserver</groupId>
    <artifactId>parent</artifactId>
    <version>29</version>
    <packaging>pom</packaging>
    <name>Open-Server parent</name>
    <url>http://github.com/sosandstrom/open-server</url>
    <description>Open Server contains modules for Server development, most on top of Spring and some for Google App Engine</description>

    <modules>
        <module>errors</module>
        <module>j2ee</module>
        <module>security</module>
        <module>domain</module>
        <module>io-core</module>
        <module>json</module>
        <module>jsonp</module>
        <module>mvc-boiler</module>
        <module>push</module>
        <module>transactions</module>
        <module>transactions-gae</module>
        <module>security-gae</module>
        <module>webapp</module>
        <module>analytics</module>
        <module>analytics-gae</module>
        <module>tools-gae</module>
        <module>test</module>
        <module>webapp-j2ee</module>
    </modules>
    
    <properties>
        <gae.version>1.7.5</gae.version>
        <docrest.version>1.23</docrest.version>
        <mardao.version>2.3.3</mardao.version>
        <spring.version>3.1.1.RELEASE</spring.version>
        <spring.security.version>3.1.0.RELEASE</spring.security.version>
        <org.springframework.social.version>1.0.1.RELEASE</org.springframework.social.version>
        <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
        <java.version>1.6</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <logging.level>ALL</logging.level>
        <downloadSources>false</downloadSources>
    </properties>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.2.2</version>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!-- Java compiler version -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
                
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.1.1</version>
                    <executions>
                        <execution>
                            <id>bundle-sources</id>
                            <phase>package</phase>
                            <goals>
                                <!-- produce source artifact for main project sources -->
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9</version>
                    <executions>
                        <execution>
                            <id>resource-bundles</id>
                            <phase>package</phase>
                            <goals>
                                <!-- produce source artifact for main project sources -->
                                <goal>resource-bundle</goal>
                            </goals>
                            <configuration>
                                <detectOfflineLinks>false</detectOfflineLinks>
                            </configuration>
                        </execution>

                    </executions>
                </plugin>
                
            </plugins>
        </pluginManagement>
    </build>
    
    <licenses>
        <license>
            <name>GPL v3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
            <distribution>repo</distribution>
            <comments>Third party libraries used in this project have their own licenses.</comments>
        </license>
    </licenses>
        
    <developers>
        <developer>
            <id>mattiaslevin</id>
            <name>Mattias Levin</name>
            <email>mattias.levin@gmail.com</email>
            <url>http://www.linkedin.com/in/mattiaslevin</url>
        </developer>
        <developer>
            <id>sosandstrom</id>
            <name>Ola Sandstrom</name>
            <email>s.o.sandstrom@gmail.com</email>
            <url>http://www.linkedin.com/in/sosandstrom</url>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/sosandstrom/open-server</url>
        <developerConnection>scm:git:ssh://git@github.com/sosandstrom/open-server.git</developerConnection>
    </scm>

    <distributionManagement>
        <repository>
            <id>sosandstrom-github-releases</id>
            <name>sosandstrom GitHub releases repo</name>
            <url>file:../mvn-repo/releases</url>
        </repository>
        <snapshotRepository>
            <id>sosandstrom-github-snapshots</id>
            <name>sosandstrom GitHub snapshots repo</name>
            <url>file:../mvn-repo/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/sosandstrom/open-server/issues</url>
    </issueManagement>

    <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-javadoc-plugin</artifactId>
                        <version>2.8</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.1.2</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>sonatype-nexus-staging</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
            </distributionManagement>
        </profile>
        
        <!--Profiles for handling different location of tools.jar on OSX-->
        <profile>
            <id>default-profile</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <file>
                    <exists>${java.home}/../lib/tools.jar</exists>
                </file>
            </activation>
            <properties>
                <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
            </properties>
        </profile>
        <profile>
            <id>mac-profile</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <file>
                    <exists>${java.home}/../Classes/classes.jar</exists>
                </file>
            </activation>
            <properties>
                <toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
            </properties>
        </profile>

    </profiles>
</project>
