我是GWT和PlayN的新手。遵循PlayN wiki中的两个安装指南,让PlayN在Eclipse中工作:BeginnerInstallationGuide和GettingStarted。我可以运行showcase-java项目但是showcase-html版本在编译期间会产生问题,说它无法找到验证jar。这是GWT编译器的输出:
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 C:\Users\Jo\playn-samples\showcase\html\target\playn-showcase-html-1.0-SNAPSHOT\showcase
Link succeeded
Compilation succeeded -- 62.900s
非常感谢任何帮助!
答案 0 :(得分:1)
我没有答案, 但也许尝试清理并重建项目“playn-showcase”。
还尝试运行“mvn package”(在eclipse中:运行为... / Maven构建...目标'包')用于项目“playn-showcase”(显式不是“playn-shocase-html” )。
这个程序可能会创建丢失的jar'playn-showcase-html-1.0-SNAPSHOT.jar'。
答案 1 :(得分:1)
尝试将以下依赖项添加到showcase-html pom.xml中(如果它们尚不存在...)
<dependencies>
...
<!-- not really needed, but will suppress errors during GWT compilation -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
...
</dependencies>