Thursday, May 7, 2015

GWT project settings

=========== app-client =================

<?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/maven-v4_0_0.xsd">



    <parent>
        <artifactId>app</artifactId>
        <groupId>com.paniov.app</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>app-client</artifactId>
    <packaging>war</packaging>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <finalName>app</finalName>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <configuration>
                    <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
                    <disableCastChecking>true</disableCastChecking>
                    <extraJvmArgs>-Xmx1500m -Xss1024k</extraJvmArgs>
                    <deploy>${project.build.directory}/${project.build.finalName}/WEB-INF/deploy</deploy>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>resources</goal>
                        </goals>
                        <configuration>
                            <webappDirectory>${project.build.directory}/${project.build.finalName}
                            </webappDirectory>
                        </configuration>
                    </execution>
                </executions>
                <!-- Plugin configuration. There are many available options, see
                  gwt-maven-plugin documentation at codehaus.org -->
                <!--<configuration>
                    <runTarget>SampleWebApp.html</runTarget>
                    <hostedWebapp>${webappDirectory}</hostedWebapp>
                </configuration>-->
            </plugin>

            <!-- Copy static web files before executing gwt:run -->
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>exploded</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <webappDirectory>${webappDirectory}</webappDirectory>
                </configuration>
            </plugin>-->

            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
                <configuration>
                    <classesDirectory>${project.build.directory}/${project.build.finalName}</classesDirectory>
                    <classifier>gwt</classifier>
                    <includes>
                        <include>${project.artifactId}*/**</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>${gwt.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

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

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

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

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

        <dependency>
            <groupId>com.google.gwt.inject</groupId>
            <artifactId>gin</artifactId>
            <version>2.1.2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>

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

        <dependency>
            <groupId>org.gwtbootstrap3</groupId>
            <artifactId>gwtbootstrap3</artifactId>
            <version>${gwtBootstrap3.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.gwtbootstrap3</groupId>
            <artifactId>gwtbootstrap3-extras</artifactId>
            <version>${gwtBootstrap3.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.fusesource.restygwt</groupId>
            <artifactId>restygwt</artifactId>
            <version>2.0</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.1.0.Final</version>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.1.0.Final</version>
            <classifier>sources</classifier>
        </dependency>

        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
            <classifier>sources</classifier>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>

        <!-- TEST -->

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.5</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.googlecode.gwt-test-utils</groupId>
            <artifactId>gwt-test-utils</artifactId>
            <version>0.44</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-servlet</artifactId>
            <version>3.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- Required because snapshot releases may need to be fetched by CI server -->
    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

</project>


============== app ===============

<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <artifactId>app</artifactId>
    <groupId>com.paniov.app</groupId>
    <version>1.0-SNAPSHOT</version>

    <packaging>pom</packaging>

    <modules>
        <module>app-client</module>
    </modules>

    <properties>
        <java.version>1.6</java.version>
        <resources.encoding>UTF-8</resources.encoding>
        <gwt.version>2.7.0</gwt.version>
        <gwtBootstrap3.version>0.9.1</gwtBootstrap3.version>
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <slf4j.version>1.6.5</slf4j.version>
        <junit.version>4.9</junit.version>
        <guava.version>15.0</guava.version>
        <log4j.version>1.2.17</log4j.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <showWarnings>true</showWarnings>
                    <!--<showDeprecated>true</showDeprecated>-->
                    <encoding>${resources.encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <includeEmptyDirs>true</includeEmptyDirs>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
        </dependency>
    </dependencies>

</project>

================ bitwitapp.gwt.xml ===========



<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
        "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="main">

    <!-- Inherit the core Web Toolkit stuff.                  -->
    <inherits name='com.google.gwt.user.User'/>
    <inherits name="com.google.gwt.i18n.I18N"/>
    <inherits name="com.google.gwt.uibinder.UiBinder" />
    <inherits name="com.google.gwt.place.Place"/>
    <inherits name="com.google.gwt.activity.Activity"/>
    <inherits name="com.google.gwt.editor.Editor"/>
    <!--<inherits name="org.gwtbootstrap3.GwtBootstrap3NoTheme"/>-->
    <inherits name='org.gwtbootstrap3.GwtBootstrap3'/>
    <inherits name="com.google.gwt.inject.Inject"/>

    <!-- Specify the app entry point class.                   -->
    <entry-point class='com.paniov.bitwitwebapp.client.MainModule'/>

    <!--<stylesheet src="css/autobahn-flat.css"/>-->
    <!--<stylesheet src="custom-style.css"/>-->
    <inherits name="com.paniov.bitwitwebapp.Resources"/>

    <set-property name="user.agent" value="safari,gecko1_8"/>

    <source path="client"/>


    <!-- turn off data urls -->
    <set-property name="ClientBundle.enableInlining" value="false" />
    <!-- turn off merging of CSS rules -->
    <set-configuration-property name="CssResource.mergeEnabled" value="false" />
    <!-- produce human-readable CSS -->
    <set-configuration-property name="CssResource.style" value="pretty" />


    <!-- Specify the app servlets.                   -->
    <servlet path='/BitwitwebappService' class='com.paniov.bitwitwebapp.server.BitwitwebappServiceImpl'/>

    <replace-with class="com.paniov.bitwitwebapp.client.mvp.ClientFactoryImpl">
        <when-type-is class="com.paniov.bitwitwebapp.client.mvp.ClientFactory"/>
    </replace-with>

</module>


============  trsources.gwt.xml ========


No comments: