nitin verma
nitin verma

Reputation: 634

Is it possible to run and debug a GWT-Maven project in Super Dev Mode?

I have a core idea of maven and I want to take support of maven in GWT so I create a project using GWT and maven. currently to run this I have to install it and manually deployed it on tomcat server. its really a time taking process.

is it possible to run this Gwt-Maven project using super dev mode?

My FishingEntry.gwt.xml

 <module rename-to='WeeklyFishingInit'>

  <inherits name="ae.ead.fishing.common.FishingCommon"/>
  <entry-point class="ae.ead.fishing.init.client.FishingEntry"/>

  <source path="client" />
  <source path="shared" />
</module>

and pom.xml is

<plugins>
    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>${gwt.maven.plugin.version}</version>
        <configuration>
                <encoding>UTF-8</encoding>
                <skip>false</skip>
                <!-- disableCastChecking>true</disableCastChecking -->
                <!-- disableClassMetadata>true</disableClassMetadata --> 
                <!-- draftCompile>true</draftCompile -->
                <!-- style>PRETTY</style-->
                <soyc>false</soyc>
                <optimizationLevel>0</optimizationLevel>
                <compileReport>false</compileReport>
                <!-- extraParam>true</extraParam -->
                <runTarget>FishingEntry.html</runTarget>
                <hostedWebapp>${webappDirectory}</hostedWebapp>
            </configuration>


    </plugin>

my Project structure is

enter image description here

and Error is

enter image description here

my target folder is

enter image description here

Upvotes: 1

Views: 3589

Answers (2)

Brandon
Brandon

Reputation: 2094

I setup super dev mode like this.

  1. Set the launcherDir in the configuration to the war output path, target/webapp folder.
  2. Then run, gwt:run-codeserver

Upvotes: 0

pleft
pleft

Reputation: 7915

Sure, that's how we run our GWT-Spring-Maven project. Add to your pom.xml the gwt-maven-plugin plugin (link), something like below:

pom.xml

<plugins>
<!-- rest of your plugins here -->
    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
            <runTarget>com.example.Application/Application.html</runTarget>
            <!--<extraJvmArgs>-Xmx6G</extraJvmArgs>-->
            <!--<localWorkers>1</localWorkers>-->
            <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
            <bindAddress>0.0.0.0</bindAddress>
            <i18nMessagesBundle>com.example.client.ApplicationMessages</i18nMessagesBundle>
            <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
            <debugSuspend>false</debugSuspend>
            <deploy>${project.build.outputDirectory}</deploy>
        </configuration>
        <executions>
            <execution>
                <goals>
                    <goal>compile</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
</plugins>

do any configuration if required and run it with:

mvn gwt:run or mvn gwt:debug

Upvotes: 3

Related Questions