<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2011 JBoss, by Red Hat, Inc
  ~
  ~ 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <name>Errai</name>
    <groupId>org.jboss.errai</groupId>
    <artifactId>errai-parent</artifactId>
    <version>2.0.CR2</version>
    <packaging>pom</packaging>

    <url>http://jboss.org/errai/errai</url>

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

    <description>
        A GWT framework.
    </description>

    <developers>
        <developer>
            <name>Mike Brock</name>
        </developer>
        <developer>
            <name>Christian Sadilek</name>
        </developer>
        <developer>
            <name>Jonathan Fuerth</name>
        </developer>
        <developer>
            <name>Heiko Braun</name>
        </developer>
    </developers>

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

    <organization>
        <name>JBoss, a division of Red Hat</name>
        <url>http://www.jboss.org</url>
    </organization>

    <!-- IssueManagement -->
    <issueManagement>
        <system>jira</system>
        <url>http://jira.jboss.org/jira/browse/ERRAI</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gwt.version>2.4.0</gwt.version>
        <gwt.maven.version>2.4.0</gwt.maven.version>
        <guice.version>3.0</guice.version>
        <mvel.version>2.1.Beta8</mvel.version>
        <appengine.version>1.3.5</appengine.version>
        <validation.api.version>1.0.0.GA</validation.api.version>
        <slf4j.version>1.6.1</slf4j.version>
    </properties>

    <modules>
        <module>errai-common</module>
        <module>errai-ioc</module>
        <module>errai-bus</module>
        <module>errai-bus/demos</module>
        <module>errai-tools</module>
        <module>errai-codegen</module>
        <module>errai-marshalling</module>
        <module>errai-js</module>
        <module>errai-cdi</module>
        <module>errai-jaxrs</module>
        <module>errai-uibinder</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-dev</artifactId>
                <version>${gwt.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${validation.api.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${validation.api.version}</version>
                <classifier>sources</classifier>
            </dependency>

            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>3.0</version>

                <exclusions>
                    <exclusion>
                        <groupId>javax.inject</groupId>
                        <artifactId>javax.inject</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>

            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>10.0.1</version>
            </dependency>

            <dependency>
                <groupId>org.mvel</groupId>
                <artifactId>mvel2</artifactId>
                <version>${mvel.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>persistence-api</artifactId>
                <version>1.0</version>
            </dependency>

            <dependency>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-api</artifactId>
                <version>${appengine.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-api-labs</artifactId>
                <version>${appengine.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.jboss.errai.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <!-- include module descriptors from src/main/java in order not to break
                the Intellij GWT plugin -->
        <resources>
            <resource>
                <directory>src/main/java</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.jboss.errai</groupId>
                <artifactId>jacoco-gwt-maven-plugin</artifactId>
                <version>0.5.4.201202141554</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>site</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.5</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <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>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.0-beta-9</version>
            </plugin>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>www-test/**</include>
                                <include>.gwt/**</include>
                                <include>.errai/**</include>
                                <include>war/WEB-INF/deploy/**</include>
                                <include>war/WEB-INF/lib/**</include>
                                <include>war/WEB-INF/classes/**</include>
                                <include>src/main/webapp/WEB-INF/deploy/**</include>
                                <include>src/main/webapp/WEB-INF/lib/**</include>
                                <include>src/main/webapp/WEB-INF/classes/**</include>
                                <include>**/gwt-unitCache/**</include>
                                <include>**/*.JUnit/**</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
        </plugins>

        <!-- PluginManagement -->
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>${gwt.maven.version}</version>
                    <executions>
                        <execution>
                            <goals>
                              <goal>resources</goal>
                              <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>clean</id>
                            <phase>clean</phase>
                            <goals>
                              <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>gwt-maven-plugin</artifactId>
                                        <versionRange>[2.3.0,)</versionRange>
                                        <goals>
                                            <goal>resources</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute/>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.jacoco</groupId>
                                        <artifactId>jacoco-maven-plugin</artifactId>
                                        <versionRange>[0.0.0,)</versionRange>
                                        <goals>
                                            <goal>prepare-agent</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.jboss.errai</groupId>
                                        <artifactId>jacoco-gwt-maven-plugin</artifactId>
                                        <versionRange>[0.0.0,)</versionRange>
                                        <goals>
                                            <goal>prepare-agent</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

    <!-- Reporting -->
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <show>public</show>

                    <groups>
                        <group>
                            <title>Bus</title>
                            <packages>org.jboss.errai.bus.*</packages>
                        </group>
                    </groups>
                    <subpackages>
                        org.jboss.errai.bus.client.api:org.jboss.errai.bus.client.framework
                    </subpackages>
                </configuration>
            </plugin>
        </plugins>

    </reporting>

    <!-- Profiles -->
    <profiles>
        <profile>
            <id>integration-test</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>false</skipTests>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>quick-hosted-mode</id>
            <activation>
                <property>
                    <name>hosted</name>
                </property>
            </activation>
            <properties>
                <google.webtoolkit.compileSkip>true</google.webtoolkit.compileSkip>
                <o>true</o>
                <!-- offline -->
            </properties>
        </profile>

        <profile>
            <id>distro</id>
            <modules>
                <module>reference</module>
                <module>quickstart</module>
                <module>dist</module>
            </modules>
        </profile>
    </profiles>

    <!-- Repositories -->
    <repositories>
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Maven Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
            <releases>
                <updatePolicy>always</updatePolicy>
            </releases>
        </repository>
        <repository>
            <id>gilead-repo</id>
            <name>Gilead Maven Repo</name>
            <url>http://gilead.svn.sourceforge.net/svnroot/gilead/gilead/maven-repo/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>gilead-snapshots-repo</id>
            <name>Gilean Maven Snapshots Repo</name>
            <url>http://gilead.svn.sourceforge.net/svnroot/gilead/gilead/maven-snapshots-repo/</url>
            <layout>default</layout>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>reflections-repo</id>
            <name>Reflections Maven2 Repository</name>
            <url>http://reflections.googlecode.com/svn/repo</url>
        </repository>

        <repository>
            <id>codehaus.org</id>
            <name>Codehaus Maven Repository</name>
            <url>http://repository.codehaus.org/</url>
        </repository>

        <repository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>codehaus.org-snapshots</id>
            <name>Codehaus Snapshots Maven Repository</name>
            <url>http://snapshots.repository.codehaus.org/</url>
        </repository>

        <repository>
            <id>maven-central</id>
            <name>Maven Central</name>
            <url>http://repo1.maven.org/</url>
        </repository>

        <repository>
            <id>msgpack.org</id>
            <name>MessagePack Repository for Maven</name>
            <url>http://msgpack.org/maven2/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Maven Repository Group</name>
            <url>https://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </pluginRepository>

        <pluginRepository>
            <id>jacoco-snapshot-repository</id>
            <name>JaCoCo Snapshot Build Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <layout>default</layout>
        </pluginRepository>
    </pluginRepositories>

    <!-- DistributionManagement -->
    <distributionManagement>
        <repository>
            <id>jboss-releases-repository</id>
            <name>JBoss Releases Repository</name>
            <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
        </repository>

        <snapshotRepository>
            <id>jboss-snapshots-repository</id>
            <name>JBoss Snapshots Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
</project>
