如何在生产模式下运行maven / eclipse / GWT / playN应用程序? [英] How do I run a maven/eclipse/GWT/playN app in production mode?

查看:130
本文介绍了如何在生产模式下运行maven / eclipse / GWT / playN应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您要使用以下步骤从eclipse在生产模式下启动playN / GWT / maven应用程序,似乎有问题:


  1. 右键单击playn-showcase-html并选择Goolge-GWT编译



    编译模块playn.showcase.Showcase
    解析com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator
    找到类型'com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator'
    找到的类型'javax.validation.constraints。 DecimalMax'
    [WARN]检测到与'javax.validation.Constraint'相关的警告。验证 - < version> .jar在类路径上?
    指定-logLevel DEBUG以查看所有错误。
    [WARN]忽略不可解析的注释类型javax.validation.Constraint
    编译1排列
    编译排列0 ...
    成功排列的编译
    链接到/ Users / bryan / dev / playn-samples / showcase / html / target / playn-showcase-html-1.0-SNAPSHOT / showcase
    链接成功
    编译成功 - 19.459s
    p>

    任何人都知道这些警告是什么?


  2. 右键单击playn-showcase-html并选择Run作为网络应用程序


  3. 转到URL http ://127.0.0.1:8888 / Showcase.html ,你会得到一个错误,说 GWT模块'showcase'可能需要(重新)编译


这个方法似乎是如果你交换步骤1& 2,但只是似乎倒退了。我认为问题是,当您从eclipse运行Web应用程序时,gwt maven插件正在编译/部署工件,再次执行先前的GWT编译步骤。



无论如何,这不是一个巨大的交易,因为你可以扭转步骤的顺序让它工作,但我只是好奇,如果有人找到一个解决方案。

解决方案

我建议您尝试使用maven直接编译/运行,而不是通过Eclipse,首先转到游戏的根目录,然后执行以下操作:



mvn clean package



应该编译你的游戏没有问题,然后



mvn test -Ptest-html



并且应该运行您的游戏在 http:// localhost:8080 /



希望这有帮助,我强烈建议直接使用maven,因为Eclipse有很多不兼容某些事情的可能性问题。


There seems to be an issue if you want to launch a playN/GWT/maven app from eclipse in production mode using the following procedure:

  1. Right click on playn-showcase-html and select Goolge-GWT Compile

    Compiling module playn.showcase.Showcase Resolving com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator Found type 'com.google.gwt.validation.client.constraints.AbstractDecimalMaxValidator' Found type 'javax.validation.constraints.DecimalMax' [WARN] Detected warnings related to 'javax.validation.Constraint'. Is validation-<version>.jar on the classpath? Specify -logLevel DEBUG to see all errors. [WARN] Ignoring unresolvable annotation type javax.validation.Constraint Compiling 1 permutation Compiling permutation 0... Compile of permutations succeeded Linking into /Users/bryan/dev/playn-samples/showcase/html/target/playn-showcase-html-1.0-SNAPSHOT/showcase Link succeeded Compilation succeeded -- 19.459s

    Anyone know what these warnings are about?

  2. Right click on playn-showcase-html and select Run As web application

  3. Go to URL http://127.0.0.1:8888/Showcase.html in your browser and you'll get an error that says GWT module 'showcase' may need to be (re)compiled.

The only way around this appears to be if you swap steps 1 & 2, but that just seems backwards. I think the problem is that the when you run the web app from eclipse that the gwt maven plugin is compiling/deploying the artifacts again which step on your previous GWT compile step.

Anyways, this isn't a huge deal since you can reverse the order of steps to get it to work, but I was just curious if anyone has found a solution to this.

解决方案

I suggest that you try to compile/run it with maven directly, not through Eclipse, first go to the root directory of your game and do the following:

mvn clean package

that should compile your game without problems, and then

mvn test -Ptest-html

and that should run your game in http://localhost:8080/

Hope this helps, and I strongly suggest that use maven directly whenever you can, because Eclipse has a lot of incompatibility problems with some things.

这篇关于如何在生产模式下运行maven / eclipse / GWT / playN应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆