Creating a GWT project in Eclipse

In this section, we will run the starter application on WildFly. We will compile and package the application with Maven in Eclipse. First we need to import the GWT application to Eclipse.

In Eclipse, select File | New | Other. In New, select JBoss Central | Java EE Web Project in the manner shown in the following screenshot. Then, click on Next.

Creating a GWT project in Eclipse

A test gets run for the requirements, which include the m2e and m2eclipse-wtp plugins, the JBoss Maven Tools plugin, and GWT Plugin, shown in the following screenshot. Click in the Create a blank project checkbox and select WildFly 8.x Runtime as Target Runtime. Now, click on Next.

Creating a GWT project in Eclipse

In the New Project Example wizard to create a Java EE Web Project, specify Project name (jboss-gwt) and Package (com.mycompany.mywebapp), as shown in the following screenshot, and click on Next.

Creating a GWT project in Eclipse

Specify Group Id (com.mycompany.mywebapp), Artifact Id (jboss-gwt), Version (1.0.0), and Package (com.mycompnay.mywebapp), as shown in the following screenshot . After this, click on Finish.

Creating a GWT project in Eclipse

The jboss-gwt project gets created. But, the GWT project generated is not the one we will run. Remove the files in the jboss-gwt project's \jboss-gwtsrcmainjava folder and the \jboss-gwtsrcmainwebapp folder. Add the C:gwt-2.6.0MyWebAppsrc folder files generated for the starter GWT web application on the command line to the jboss-gwt project's \jboss-gwtsrcmainjava folder. Then, copy the files of the C:GWTgwt-2.6.0MyWebAppwar directory to the \jboss-gwtsrcmainwebapp directory. Select File | Refresh to refresh the application folder. The starter GWT web application is shown in Project Explorer as follows:

Creating a GWT project in Eclipse
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset