Points to observe during this tutorial
You should have following Software installed on your system to follow this tutorial.
First you should have following downloaded in order to follow this tutorial. You should have java1.6 installed o,Eclipse WTP and Maven2.2 installed on your computer. in addition to that, if you are expecting your eclipse to provide facility run maven commands , then you need to have m2eclipse plugin installed on your system. I am not going to discuss how to set these configurations on your system.
Now , you have it all :). Oky, if not , i would assume you have it all.
So, Since your goal is to use Maven as a build tool for your project. i believe you might have this doubt that, what should be the first stop.
if you are using Maven, you should follow below step first , no matter what type of project you are developing.
There are two ways to generate web project with maven automated build tool.
1. Using Command Prompt
2. Using IDE like eclipse or Ideas with maven plugin integrated in to it.
Using Command Prompt
On your command line, execute the following Maven goal:
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
You will notice that the generate goal created a directory with the same name given as the artifactId. Change into that directory.cd my-appUnder this directory you will notice the following standard project structure.Now , you have created maven web application, Very important point to notice here is that, web application project structure created by maven is different form project structure created for a web application using eclipse IDE without using Maven. Keep this point in mind, i will later come to this point and explain how this difference could affect development activities.Same project structure can be created if you are using m2eclipse plugin. .
No comments:
Post a Comment