【问题标题】:How can I use SuperDevMode with Maven如何在 Maven 中使用 SuperDevMode
【发布时间】:2012-06-16 12:06:29
【问题描述】:

在阅读了很多关于 gwt 2.5 的 SuperDevMode 之后,我想自己尝试一下。我阅读了https://vaadin.com/blog/-/blogs/vaadin-and-superdevmode 和其他一些文章。据我了解,我必须运行 codeserver 类。 我查看了 gwt-maven-plugin 存储库,但不太确定是否已经支持 gwt2.5。

有没有人设法让 SuperDevMode 与 maven 一起工作?

问候, 阿恩

编辑:

感谢 Thomas,我成功了!!这是我的pom的摘录。

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

    <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>exec-maven-plugin</artifactId>
       <version>1.2.1</version>
        <executions>
            <execution>
              <goals>
                <goal>java</goal>
              </goals>
            </execution>
        </executions>

      <configuration>                                     
         <mainClass>com.google.gwt.dev.codeserver.CodeServer</mainClass>
         <arguments>
                <argument>com.myapp.Application</argument>
         </arguments>
      </configuration>

   </plugin>

现在我只需要运行目标:exec:java 即可启动代码服务器。

【问题讨论】:

    标签: gwt maven gwt-maven-plugin


    【解决方案1】:

    gwt-maven-plugin 的 2.5.0-rc1 版本将通过 run-codeserver goal 支持它。该版本目前正在上演。请测试它和vote

    与此同时,您可以将它与 exec-maven-plugin 一起使用。

    【讨论】:

    • 非常感谢!!我在本地存储库中部署了代码服务器,现在设置了 exec-maven-plugin。但是我在类路径上遇到了麻烦。当我尝试执行目标时,它抱怨所有 gwt.xml 文件丢失。即使是番石榴或注入的:(
    • 大多数 gwt 依赖项没有被拾取,因为它们具有“提供”的范围。我自己的 gwt.xml 文件不在类路径中。如果我手动复制它们。查找入口点类时出现错误,即使它实际上位于类路径中。
    • classpathScope 设置为compile 用于exec-maven-plugin
    • 我已经这样做了,我的目标文件夹已添加到类路径中。虽然 gwt.xml 文件不在目标文件夹中(我必须手动复制它们)。这会是个问题吗?
    • 它应该工作相同。或者,您可以将它们作为 -src 参数传递(实际上您也可以为 src/main/java 这样做)。
    【解决方案2】:

    这个 src repo:https://github.com/jbarop/gwt-maven-plugin/tree/gwt-2.5 看起来它支持 GWT 2.5,最后提交消息是:

    为运行代码服务器添加了 mojo

    (免责声明:我自己还没有尝试过)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-09
      • 2015-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多