Step 1:- Make sure you had already installed Apache MAVEN in your machine. We can download Apache MAVEN from https://maven.apache.org/download.cgi
Once you installed Apache MAVEN you will be able to see this folder structure.
Once you installed Apache MAVEN you will be able to see this folder structure.
Step 2- Make sure you have installed m2eclipse plugin for Eclipse. Once you installed this in ecplise you will be able to right click and then run and debug the application while running it as Maven projects. In STS IDe it is by default available.
The goal of the m2ec project is to provide a first-class Apache Maven support in the Eclipse IDE, making it easier to edit Maven's pom.xml, run a build from the IDE and much more.
Source: http://eclipse.org/m2e/
Step 3:- Install gwt maven plugin gwt-maven-plugin-2.7.0.jar download the same from the http://mvnrepository.com/artifact/org.codehaus.mojo/gwt-maven-plugin/2.7.0
First we need to install this plugin before using the same in Eclipse. for doing this use this command.
Go to bin folder of your installed maven
Go to bin folder of your installed maven
C:\apache-maven-3.2.5\bin>mvn install:install-file -DgroupId=org.codehaus.mojo -DartifactId=gwt-maven-plugin -Dversion=2.7.0 -Dpackaging=jar -Dfile=C:/to_delete/gwt-maven-plugin-2.7.0.jar
=============You will see following message ===================================
C:\apache-maven-3.2.5\bin>mvn install:install-file -DgroupId=org.codehaus.mojo -DartifactId=gwt-maven-plugin -Dversion=2.7.0 -Dpackaging=jar -Dfile=C:/to_delete/gwt-maven-plugin-2.6.0-rc1.jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing C:\to_delete\gwt-maven-plugin-2.7.0.jar to C:\Users\XXXX\.m2\repository\org\codehaus\mojo\gwt-maven-plugin\2.7.0\gwt-maven-plugin-2.7.0.jar
[INFO] Installing C:\Users\XXXX\AppData\Local\Temp\mvninstall1372865269736446628.pom to C:\Users\XXXX\.m2\repository\org\codehaus\mojo\gwt-maven-plugin\2.7.0\gwt-maven-plugin-2.7.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.995 s
[INFO] Finished at: 2015-10-26T12:25:25+05:30
[INFO] Final Memory: 6M/119M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing C:\to_delete\gwt-maven-plugin-2.7.0.jar to C:\Users\XXXX\.m2\repository\org\codehaus\mojo\gwt-maven-plugin\2.7.0\gwt-maven-plugin-2.7.0.jar
[INFO] Installing C:\Users\XXXX\AppData\Local\Temp\mvninstall1372865269736446628.pom to C:\Users\XXXX\.m2\repository\org\codehaus\mojo\gwt-maven-plugin\2.7.0\gwt-maven-plugin-2.7.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.995 s
[INFO] Finished at: 2015-10-26T12:25:25+05:30
[INFO] Final Memory: 6M/119M
[INFO] ------------------------------------------------------------------------
Step 4:- Restart your eclipse and create a new MAven Project
right click --> new --> other -->Maven -->Maven Project-->Next-->Select our Maven installed files (refer to the below image)-->Fill all necessary information and
Step 5:- After this project wil be created in Eclipse as shown below
Step 6:- In our created project we found that their is no GreetingServiceAsync . We must generate them by triggering a Maven command or let Maven generate them automatically for you.i.e. gwt:generateAsync
right click on proect-->Run configuration --> inside MAven--> see below screen and click run
on success we will see this on console prompt
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:generateAsync (default-cli) @ gwt-maven-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.684 s
[INFO] Finished at: 2015-10-26T14:14:16+05:30
[INFO] Final Memory: 12M/150M
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:generateAsync (default-cli) @ gwt-maven-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.684 s
[INFO] Finished at: 2015-10-26T14:14:16+05:30
[INFO] Final Memory: 12M/150M
[INFO] ------------------------------------------------------------------------
Step 7:- Finally run install command of maven to create build
right click on proect-->Run configuration --> inside MAven--> see below screen and click run
we will get this log.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.543 s
[INFO] Finished at: 2015-10-26T14:17:03+05:30
[INFO] Final Memory: 27M/195M
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.543 s
[INFO] Finished at: 2015-10-26T14:17:03+05:30
[INFO] Final Memory: 27M/195M
[INFO] ------------------------------------------------------------------------
No comments:
Post a Comment