简体   繁体   English

是否可以在超级开发模式下运行和调试GWT-Maven项目?

[英]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 . 我有一个maven的核心思想,我想在GWT支持maven ,所以我使用GWTmaven创建了一个项目。 currently to run this I have to install it and manually deployed it on tomcat server. 目前要运行这个我必须install它并在tomcat服务器上manually deployed它。 its really a time taking process. 它真的是一个时间的过程。

is it possible to run this Gwt-Maven project using super dev mode ? 是否可以使用super dev mode runGwt-Maven项目?

My FishingEntry.gwt.xml 我的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 和pom.xml是

<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 我的项目结构是

在此输入图像描述

and Error is 和错误是

在此输入图像描述

my target folder is 我的目标文件夹是

在此输入图像描述

Sure, that's how we run our GWT-Spring-Maven project. 当然,这就是我们运行GWT-Spring-Maven项目的方式。 Add to your pom.xml the gwt-maven-plugin plugin ( link ), something like below: 在你的pom.xml添加gwt-maven-plugin插件( 链接 ),如下所示:

pom.xml 的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 mvn gwt:runmvn gwt:debug

I setup super dev mode like this. 我设置了这样的超级开发模式。

  1. Set the launcherDir in the configuration to the war output path, target/webapp folder. 将配置中的launcherDir设置为war输出路径target / webapp文件夹。
  2. Then run, gwt:run-codeserver 然后运行,gwt:run-codeserver

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM