2

I am new to both GWT and PlayN. Followed two installation guides from the PlayN wiki to get PlayN working in Eclipse: BeginnerInstallationGuide and GettingStarted. I can run the showcase-java project but the showcase-html version produces a problem during compiling, saying that it cannot find a validation jar. This is the output of the GWT compiler:

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

Would appreciate any help!

RAS
  • 8,100
  • 16
  • 64
  • 86
Jo Simon
  • 41
  • 2

2 Answers2

1

I don't have the answer, but maybe try to clean and re-built the project "playn-showcase".

Also try to run "mvn package" (in eclipse: Run as... / Maven build... with goal 'package') for the project "playn-showcase" (explicitely not "playn-shocase-html").

This procedute probably creates the missing jar 'playn-showcase-html-1.0-SNAPSHOT.jar'.

user1141785
  • 431
  • 7
  • 21
  • Thanks, but unfortunately this did not solve the problem. I also just re-installed and configured the whole eclipse/maven/playN set according to [GettingStarted](http://code.google.com/p/playn/wiki/GettingStarted) - unfortunately without success. I am using jre7 and jdk7 - could that be the problem? I read somewhere that playN was compatible with jre6... – Jo Simon Jan 31 '12 at 15:08
  • Nope. Just switched to jre6/jdk6 but that does not help either. – Jo Simon Jan 31 '12 at 15:25
1

Try adding the following dependencies to the showcase-html pom.xml if they don't already exist...

<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>
hatboyzero
  • 1,929
  • 1
  • 21
  • 44
  • Thanks, hatboyzero. I tried your suggestion. The two dependencies were not in the POM yet. Unfortunately it did not solve the problem. I found that the Maven Dependencies in the package explorer of the Showcase example only list the javax.validation-validation-api-1.0.0.GA-source.jar but not the non-source version. Could this be related to the problem? – Jo Simon Feb 02 '12 at 10:26
  • Not entirely sure -- when I get the chance, I'll pull down the showcase code and dig around a little and let you know... – hatboyzero Feb 02 '12 at 17:42