【问题标题】:GWT maven compiler output directoryGWT maven 编译器输出目录
【发布时间】:2012-09-10 15:19:34
【问题描述】:

我需要使用 maven 插件为 GWT 编译器设置输出目录位置。

我研究了 GWT 编译器和 gwt-maven-plugin 文档,但没有找到任何选项。

例如:

我有两个名为 editorconsole 的模块,gwt-maven-plugin 将它们编译为 %ROOT%/editor%ROOT%/console 目录。

但我需要将这些模块编译到 %ROOT%/ria/editor%ROOT%/ria/console 目录中,以减少维护基于 URL 的安全性和其他内容的工作。

是否可以在插件配置中设置ria 目录以避免为将已编译的模块内容移动到所需位置而创建不必要的新 ANT 任务?

【问题讨论】:

    标签: gwt gwt-maven-plugin


    【解决方案1】:

    我不得不取消选中下面屏幕截图中突出显示的复选框

    【讨论】:

      【解决方案2】:
      <plugin>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <webappDirectory>${project.build.directory}/${project.build.finalName}/ria</webappDirectory>
        </configuration>
      </plugin>
      

      http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html#webappDirectory

      但它不能很好地与 DevMode 配合使用,除非你在 -noserver 模式下运行(无论如何我都建议任何中型/大型项目使用它)

      【讨论】:

      • 非常感谢,对您有帮助。
      • 为我工作!我在 webapp/my_project/ 中有我的网络资源,所以我在 gwt-maven-plugin 和 maven-war-plugin 中配置了 ${basedir}/src/main/webapp/my_project。我还配置了运行目标 my_project/index.html,所以 gwt:run maven 目标开始在正确的位置。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-12-04
      • 2012-10-31
      • 2013-03-13
      • 1970-01-01
      • 2018-02-13
      • 2017-11-26
      • 2010-09-21
      相关资源
      最近更新 更多