title: gwt-maven-plugin javascript compilation error
body: <p>We are moving our build system to use maven. One of our project's uses <strong>gwt (version 2.2.0)</strong>. It compiles to javascript without any errors on Eclipse, but we are having some problems in maven.</p>
  
  <p>Following is the error message when running "<em>mvn clean package</em>"</p>
  
  <pre><code>[INFO]
  [INFO] --- gwt-maven-plugin:2.2.0:compile (default) @ Analytics ---
  [INFO] auto discovered modules [com.ivstel.af.AF]
  [INFO] Compiling module com.ivstel.af.AF
  [INFO]    Validating newly compiled units
  [INFO]       [ERROR] Errors in 'jar:file:/C:/Users/Croydon.IVSTEL1/.m2/repository/com/google/gwt/google-apis/gwt-visualization/1.1.1/gwt-visualization-1.1.1.jar
  !/com/google/gwt/visualization/client/CommonOptions.java'
  [INFO]          [ERROR] Line 61: The method toJsArrayString(String[]) is undefined for the type ArrayHelper
  [INFO]       [ERROR] Errors in 'jar:file:/C:/Users/Croydon.IVSTEL1/.m2/repository/com/google/gwt/google-apis/gwt-visualization/1.1.1/gwt-visualization-1.1.1.jar
  !/com/google/gwt/visualization/client/DataTable.java'
  [INFO]          [ERROR] Line 140: The method toJsArrayInteger(int[]) is undefined for the type ArrayHelper
  [INFO]       [ERROR] Errors in 'jar:file:/C:/Users/Croydon.IVSTEL1/.m2/repository/com/google/gwt/google-apis/gwt-visualization/1.1.1/gwt-visualization-1.1.1.jar
  !/com/google/gwt/visualization/client/DataView.java'
  [INFO]          [ERROR] Line 62: The method toJsArrayInteger(int[]) is undefined for the type ArrayHelper
  [INFO]          [ERROR] Line 74: The method toJsArrayInteger(int[]) is undefined for the type ArrayHelper
  [INFO]          [ERROR] Line 82: The method toJsArrayInteger(int[]) is undefined for the type ArrayHelper
  [INFO]          [ERROR] Line 94: The method toJsArrayInteger(int[]) is undefined for the type ArrayHelper
  [INFO]       [ERROR] Errors in 'jar:file:/C:/Users/Croydon.IVSTEL1/.m2/repository/com/google/gwt/google-apis/gwt-visualization/1.1.1/gwt-visualization-1.1.1.jar
  !/com/google/gwt/visualization/client/VisualizationUtils.java'
  [INFO]          [ERROR] Line 30: The method toJsArrayString(String[]) is undefined for the type ArrayHelper
  [INFO]          [ERROR] Line 44: The method toJsArrayString(String[]) is undefined for the type ArrayHelper
  </code></pre>
  
  <p>However, the <a href="http://code.google.com/p/gwt-google-apis/downloads/detail?name=gwt-visualization-1.1.0.zip&amp;can=2&amp;q=" rel="nofollow">jar in question</a> does contain the function toJsArrayInteger in gwt-visualization-1.1.1.jar\com\google\gwt\ajaxloader\client\ArrayHelper.java</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  
    &lt;!-- POM file generated with GWT webAppCreator --&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.ivstel.analytics&lt;/groupId&gt;
    &lt;artifactId&gt;Analytics&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;1&lt;/version&gt;
    &lt;name&gt;Analytics&lt;/name&gt;
  
    &lt;properties&gt;
      &lt;!-- Convenience property to set the GWT version --&gt;
      &lt;gwtVersion&gt;2.2.0&lt;/gwtVersion&gt;
  
      &lt;!-- GWT needs at least java 1.5 --&gt;
      &lt;maven.compiler.source&gt;1.5&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.5&lt;/maven.compiler.target&gt;
      &lt;webappDirectory&gt;${project.build.directory}/${project.build.finalName}&lt;/webappDirectory&gt;
  
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
      &lt;!-- Shared version number properties --&gt;
      &lt;com.google.gwt.version&gt;${gwtVersion}&lt;/com.google.gwt.version&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
        &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt;
        &lt;version&gt;${com.google.gwt.version}&lt;/version&gt;
        &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
        &lt;artifactId&gt;gwt-user&lt;/artifactId&gt;
        &lt;version&gt;${com.google.gwt.version}&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;com.google.gwt.google-apis&lt;/groupId&gt;
        &lt;artifactId&gt;gwt-maps&lt;/artifactId&gt;
        &lt;version&gt;1.0.4&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;com.google.gwt.google-apis&lt;/groupId&gt;
        &lt;artifactId&gt;gwt-visualization&lt;/artifactId&gt;
        &lt;version&gt;1.1.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;org.gwtmultipage&lt;/groupId&gt;
        &lt;artifactId&gt;gwtmultipage-core&lt;/artifactId&gt;
        &lt;version&gt;1.0.0.Beta5&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Other dependencies ....... --&gt;
  
    &lt;/dependencies&gt;
  
    &lt;build&gt;
      &lt;!-- Generate compiled stuff in the folder used for developing mode --&gt;
      &lt;outputDirectory&gt;${webappDirectory}/WEB-INF/classes&lt;/outputDirectory&gt;
  
      &lt;plugins&gt;
  
        &lt;!-- GWT Maven Plugin --&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.2.0&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;compile&lt;/goal&gt;
                &lt;goal&gt;test&lt;/goal&gt;
                &lt;goal&gt;i18n&lt;/goal&gt;
                &lt;!-- http://stackoverflow.com/questions/3611775/gwt-maven-eclipse-plugin-compilation-fails-due-to-duplicate-class --&gt;
                &lt;!-- &lt;goal&gt;generateAsync&lt;/goal&gt; --&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
            documentation at codehaus.org --&gt;
          &lt;configuration&gt;
            &lt;runTarget&gt;AF.html&lt;/runTarget&gt;
            &lt;hostedWebapp&gt;${webappDirectory}&lt;/hostedWebapp&gt;
            &lt;i18nMessagesBundle&gt;com.ivstel.af.client.Messages&lt;/i18nMessagesBundle&gt;
          &lt;/configuration&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
                &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt;
                &lt;version&gt;${com.google.gwt.version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
                &lt;artifactId&gt;gwt-user&lt;/artifactId&gt;
                &lt;version&gt;${com.google.gwt.version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
                &lt;artifactId&gt;gwt-dev&lt;/artifactId&gt;
                &lt;version&gt;${com.google.gwt.version}&lt;/version&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
        &lt;/plugin&gt;
  
        &lt;!-- Copy static web files before executing gwt:run --&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;compile&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;exploded&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;webappDirectory&gt;${webappDirectory}&lt;/webappDirectory&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
  
      &lt;/plugins&gt;
    &lt;/build&gt;
  
    &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;noTest&lt;/id&gt;
         &lt;properties&gt;
           &lt;maven.test.skip&gt;true&lt;/maven.test.skip&gt;
         &lt;/properties&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
  
  &lt;/project&gt;
  </code></pre>