My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
CreatingNewApplications  
Creating gquery applications using the maven gquery-archetype
Featured
Updated Feb 12, 2012 by manuel.carrasco.m

This page describes how to create a new mavenized gwt-application which uses gQuery, from scratch, and using the gquery-archetype.

Steps

  • Install maven and put the mvn command in your path
  • Run the following commands in a terminal
  • This command generates a project ready to work with gwt-2.4.0, if you wanted an old version edit the file pom.xml and set the version and classifier.
  • mvn archetype:generate  -DarchetypeGroupId=com.googlecode.gwtquery \
                            -DarchetypeArtifactId=gquery-archetype  \
                            -DarchetypeVersion=1.1.3 \
                            -DgroupId=com.mycompany \
                            -DartifactId=myproject \
                            -DprojectName=MyProject 
    
  • Change to the new created folder and check that the project compiles
  •   cd myproject/
      mvn clean package
  • Run the project in develop mode
  •   mvn gwt:run

Importing the project in Eclipse

The archetype generates a project ready to use in eclipse, but before importing it you have to install the following plugins:

Then you can import the project in your eclipse using either:
  • File -> Import -> Existing Projects into Workspace
  • File -> Import -> Existing maven projects
After this you should be able to run the project in development mode and the gwt test unit.
  • Right click on the project -> Run as -> Web Application
  • Right click on the test class -> Run as -> GWT JUnit Test

Comment by slockerb...@gmail.com, Mar 28, 2012

I recommend use the second option while you are trying import to eclipse (maven project).

It works perfecly!


Sign in to add a comment
Powered by Google Project Hosting