Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6962903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:43:12+00:00 2026-05-27T15:43:12+00:00

I’m trying to build a new web app using Eclipse, I want to use

  • 0

I’m trying to build a new web app using Eclipse, I want to use Spring web services and Hibernate, so I thought I’d try using Maven instead of Ant so I don’t have to track down all the JAR files manually. This is what I did …

I have a new eclipse workspace, I used Eclipse Marketplace to install the Maven for WTP features.

I tried two things, I really don’t know the “correct” way of doing this. Any help is greatly appreciated!

ATTEMPT ONE:

Created a new Maven project, not really sure what I’m doing but I chose the “maven-archetype-webapp”. It created an eclipse project with a different (maven-esq) file structure. I added Spring Web as a dependency to the pom.xml file. I can run the web app from within eclipse and see the hello world page; and a ‘maven install’ downloads the dependencies and produces a war file. However, then I tried adding a Java class “PersonController.java” and annotate it as a @Controller (and so on) but eclipse doesn’t seem to recognize that PersonController.java is a java class. For example, I can’t generate getters/setters or use the refactoring tool to rename, eclipse gives me an error like “The resource is not in the build path of a Java project”.

In the end, I feel like the maven file structure is too different to what eclipse is expecting, and basic eclipse features seems somewhat messed up. Of course, it’s entirely possible that I’m doing something very wrong.

ATTEMPT TWO:

Created a new ‘Dynamic Web Project’ in Eclipse, everything is as expected, I can run my web app fine. Now I want to add the Spring libraries as a Maven dependency and be able to build the project with maven, so I figure I need a pom.xml file. File > New … doesn’t not seem to help me create a Maven pom.xml file, and I figure if I just create the file manually that probably won’t work. So I’m not sure how to proceed adding maven support to my ‘Dynamic Web Project’.

So here I am … can anyone help … what’s the “correct” way of doing what I’m trying to do? And is Maven worth the trouble?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:43:12+00:00Added an answer on May 27, 2026 at 3:43 pm

    I wouldn’t say there is a single correct way since not everyone would want to use maven archetypes, that’s from my experience of rehabilitating legacy web apps. For the second approach you need the m2eclipse plugin to add maven support (and auto creation of pom file if there isn’t any).

    As for whether it is worth the trouble? You will have to evaluate yourself depending on the kind of project you are dealing and to what extent you are willing to use maven. It is definitely a good way to manage shared dependencies, once you get past the initial learning curve. If you intend to follow maven conventions as much as possible, this is also the best time to do it (or figure out how to do it), since it gets much more expensive later on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am using Paperclip to handle profile photo uploads in my app. They upload
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.