java - GWT: Maven error: jar must be 'pom' to import the managed dependencies -


i made sample gwt app using webappcreator.

when running mvn command, example mvn package, getting error:

[info] scanning projects... [error] [error] problems encountered while processing poms: [warning] 'dependencymanagement.dependencies.dependency.type' com.google.gwt:gwt:jar must 'pom' import managed dependencies. @ line 21, column 19 [error] 'dependencies.dependency.version' com.google.gwt:gwt-servlet:jar missing. @ line 34, column 17 [error] 'dependencies.dependency.version' com.google.gwt:gwt-user:jar missing. @ line 39, column 17 [error] 'dependencies.dependency.version' com.google.gwt:gwt-dev:jar missing. @ line 44, column 17 [error] 'dependencies.dependency.version' com.google.gwt:gwt-codeserver:jar missing. @ line 49, column 17  @  [error] build not read 1 project -> [help 1] [error]    [error]   project com.babken.stockwatcher:stockwatcher:1.0-snapshot (/home/void/workspace/stockwatcher/pom.xml) has 4 errors [error]     'dependencies.dependency.version' com.google.gwt:gwt-servlet:jar missing. @ line 34, column 17 [error]     'dependencies.dependency.version' com.google.gwt:gwt-user:jar missing. @ line 39, column 17 [error]     'dependencies.dependency.version' com.google.gwt:gwt-dev:jar missing. @ line 44, column 17 [error]     'dependencies.dependency.version' com.google.gwt:gwt-codeserver:jar missing. @ line 49, column 17 [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/projectbuildingexception 

the [warning] line says - need add <type>pom</type> dependencymanagement in pom.xml.

open pom.xml , change following part:

  <dependencymanagement>     <dependencies>       <!-- ensure gwt deps use same version (unless overridden) -->       <dependency>         <groupid>com.google.gwt</groupid>         <artifactid>gwt</artifactid>         <version>${gwtversion}</version>         <scope>import</scope>         <type>pom</type>       </dependency>     </dependencies>   </dependencymanagement> 

to:

  <dependencymanagement>     <dependencies>       <!-- ensure gwt deps use same version (unless overridden) -->       <dependency>         <groupid>com.google.gwt</groupid>         <artifactid>gwt</artifactid>         <version>${gwtversion}</version>         <scope>import</scope>       </dependency>     </dependencies>   </dependencymanagement> 

this known bug in webappcreator: https://code.google.com/p/google-web-toolkit/issues/detail?id=9054 . update gwt latest version. (thanks thomas broyer).


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -