<!--
  ~ JBoss, Home of Professional Open Source
  ~ Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
  ~ as indicated by the @author tags. All rights reserved.
  ~ See the copyright.txt in the distribution for a
  ~ full listing of individual contributors.
  ~
  ~ This copyrighted material is made available to anyone wishing to use,
  ~ modify, copy, or redistribute it subject to the terms and conditions
  ~ of the GNU Lesser General Public License, v. 2.1.
  ~ This program is distributed in the hope that it will be useful, but WITHOUT A
  ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  ~ PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
  ~ You should have received a copy of the GNU Lesser General Public License,
  ~ v.2.1 along with this distribution; if not, write to the Free Software
  ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  ~ MA  02110-1301, USA.
  -->
<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>Ballroom :: Widgets</name>
    <description>GWT Widget Set</description>
    <artifactId>widgets</artifactId>
    <packaging>jar</packaging>


    <parent>
        <groupId>org.jboss.ballroom</groupId>
        <artifactId>ballroom</artifactId>
        <version>2.2.3</version>
        <relativePath>../pom.xml</relativePath>
    </parent>


    <dependencies>
        <!-- GWT -->
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <classifier>sources</classifier>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gwt-log</groupId>
            <artifactId>gwt-log</artifactId>
        </dependency>
        <dependency>
            <groupId>com.gwtplatform</groupId>
            <artifactId>gwtp-mvp-client</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-assistedinject</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.gwt.inject</groupId>
            <artifactId>gin</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
            </resource>
        </resources>


        <plugins>
            <plugin>
                <!-- Surefire setup in order to be able to run GWT unit tests, according to
                     http://mojo.codehaus.org/gwt-maven-plugin/user-guide/testing.html -->
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
                        <additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
                    </additionalClasspathElements>
                    <includes>
                        <include>**/*TestSuite.java</include>
                    </includes>
                    <useManifestOnlyJar>false</useManifestOnlyJar>
                    <forkMode>always</forkMode>
                    <systemProperties>
                        <property>
                            <name>gwt.args</name>
                            <value>-out ${basedir}/target/test-war</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>enableTests</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>false</skipTests>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

