There is a plugin for GWT, though I use stock Maven.

pom.xml
<dependencies>
        <!--
                gwt-user jar is needed for java compile,
                gwt compile and gwt debug - not runtime.
        -->
        <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>2.0.4</version>
                <scope>provided</scope>
        </dependency>
        <!--
                gwt-dev jar is needed for gwt debug only.
                It includes javax standard classes which
                cause problems if present in the compile
                classpath; hense the runtime scope.
        -->
        <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-dev</artifactId>
                <version>2.0.4</version>
                <scope>runtime</scope>
        </dependency>

        <dependency>
                <groupId>com.extjs</groupId>
                <artifactId>gxt</artifactId>
                <version>2.2.0</version>
                <scope>provided</scope>
        </dependency>
<dependencies>
<build>
        <plugins>
                <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <!--
                                Configuration for gwt development mode.
                                It doesn't take part into the build-lifecycle 
by default.
                                You have to fire it, explicitly, from the 
command line:
                                e.g. mvn compile war:exploded antrun:run
                        -->
                        <configuration>
                                <tasks>
                                        <property name="compile.classpath"
refid="maven.compile.classpath" />
                                        <property name="runtime.classpath"
refid="maven.runtime.classpath" />
                                        <property name="src.dir" value="$
{project.build.sourceDirectory}" />
                                        <property name="war.dir" 
value="${project.build.directory}/$
{project.build.finalName}" />
                                        <property name="gwt.module" 
value="your.project.Product" />
                                        <property name="gwt.page" 
value="index.jsp" />
                                        <ant target="gwt.debug" />
                                </tasks>
                        </configuration>
                        <!--
                                Configuration for gwt compile mode.
                        -->
                        <executions>
                                <execution>
                                        <phase>prepare-package</phase>
                                        <configuration>
                                                <tasks>
                                                        <property 
name="compile.classpath"
refid="maven.compile.classpath" />
                                                        <property 
name="runtime.classpath"
refid="maven.runtime.classpath" />
                                                        <property 
name="src.dir" value="$
{project.build.sourceDirectory}" />
                                                        <property 
name="war.dir" value="${project.build.directory}/$
{project.build.finalName}" />
                                                        <property 
name="gwt.module" value="your.project.Product" />
                                                        <ant 
target="gwt.compile" />
                                                </tasks>
                                        </configuration>
                                        <goals>
                                                <goal>run</goal>
                                        </goals>
                                </execution>
                        </executions>
                </plugin>
        </plugins>
</build>
...


build.xml
<project name="your.project.Product">

        <path id="gwt.classpath">
                <path path="${runtime.classpath}" />
                <path path="${compile.classpath}" />
                <pathelement location="${src.dir}" />
        </path>

        <target name="gwt.compile">
                <java classname="com.google.gwt.dev.Compiler" fork="true">
                        <classpath refid="gwt.classpath" />
                        <arg line="-war ${war.dir} ${gwt.module}" />
                </java>
        </target>

        <target name="gwt.debug">
                <!-- com.google.gwt.dev.HostedMode for legacy GWT 1.x -->
                <java classname="com.google.gwt.dev.DevMode" fork="true">
                        <classpath refid="gwt.classpath" />
                        <!-- 
http://java.sun.com/javase/technologies/core/toolsapis/jpda/ --
>
                        <jvmarg value="-
agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:
8000" />
                        <arg line="-war ${war.dir} -startupUrl ${gwt.page} 
${gwt.module}" /
>
                </java>
        </target>

</project>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to