aspose file tools*
The moose likes Spring and the fly likes setup spring web project? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "setup spring web project?" Watch "setup spring web project?" New topic
Author

setup spring web project?

shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
Hi,
I want to setup a sample eclipse web project for creating spring mvc application (Without using spring tool suite). What is the best approach (OR point to me any reference)?

1. Eclipse -> new project -> dynamic web project -> add libraries
2. Eclipse -> maven -> new project -> specify archetypes OR artifactid/groupid/version etc and add libraries through dependency
3. Create spring project through mvn -generate command line tool.

Please let me know pros/cons for every setup. Apart that, I have some other queries for 3rd type. Is there any archetype for Spring mvc OR I need to generate a normal web project and then add libraries to it?
For MAVEN, do we need to really install m2eclipse? If I understand then it is already available in eclipse for JEE developers. Isn't it?

Sorry for so much queries but I am really curious.

Thanks in advance.
shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
Nobody!!!
vijay jacob
Ranch Hand

Joined: Jul 02, 2013
Posts: 57


Maven 2nd approach would be the best. maven & eclipse is standard tool.

You can use the ROO from command line.It gives you lot of customization features.
shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
vijay jacob wrote:

Maven 2nd approach would be the best. maven & eclipse is standard tool.



Right but you already know that there are a lot of jars that we need to add in the POM. Including JARS directly in the eclipse build path takes less than a minute but adding all these JARS as dependency in POM will take more time. Isn't it? How to improve it or is there any best method so that these dependencies can come automatically in POM?

Thanks.
vijay jacob
Ranch Hand

Joined: Jul 02, 2013
Posts: 57


You should go throught the advantage of having maven.. Main reason people take the pain is to have version controlled jar. And it rebuilds only those changed classes unlike ant which rebuild all the classes.

If you really dont want to add the jars , then you can use the ANT build tool , where you only need to show the jars location or add it in the classpath.
shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
vijay jacob wrote:
Main reason people take the pain is to have version controlled jar. And it rebuilds only those changed classes unlike ant which rebuild all the classes.


Then how to use Maven in the scenario I mentioned?
How you will add a lot of dependencies (lets say of Spring MVC) in POM? one by one or is there some automated process?
vijay jacob
Ranch Hand

Joined: Jul 02, 2013
Posts: 57

There is no automated process.
shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
vijay jacob wrote: There is no automated process.


It means you have to add coordinates for every jar. Right?
Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
Follow the following link Setting Up Spring(MVC). It will get you started in less than 30 minutes.

SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
shai ban
Ranch Hand

Joined: Jan 05, 2010
Posts: 177
Naresh Chaurasia wrote:Follow the following link Setting Up Spring(MVC). It will get you started in less than 30 minutes.


Thanks but I am asking through Maven.
Saravana Pandiyan
Greenhorn

Joined: Mar 31, 2011
Posts: 2
Hi,

Please check this URL https://wiki.base22.com/display/btg/How+to+create+a+Maven+web+app+and+deploy+to+Tomcat+-+fast

Regards,
dspandiyan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setup spring web project?
 
Similar Threads
Starter Template Files for Java Programmers
Wanted: Maven archetype for Minimal Spring MVC/JSP page
Make a project be dynamic web project
unable to create project from archetype
maven struts2 plugins