• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

setup spring web project?

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nobody!!!
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

There is no automated process.
 
shai ban
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

vijay jacob wrote: There is no automated process.



It means you have to add coordinates for every jar. Right?
 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow the following link Setting Up Spring(MVC). It will get you started in less than 30 minutes.
 
shai ban
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic