• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Still do not understand Maven

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am trying to make sense out of Maven. At the moment I am trying to integrate JSF, Spring and hibernate and I want to know how Maven can help me.
I have a working small test web-app, which already integrates the three frameworks. I downloaded this app from the internet and I managed to import it into eclipse using a maven import project utility. Can I use maven, somehow, in order to start developing a more real app from this test app, taking the integration of the framework components?
My problem is building a web application with the above frameworks, but the integration of them is really hurting me. Can Maven save this pain?

Thank you.David
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

but the integration of them is really hurting me. Can Maven save this pain?


What kind of integration are looking for? Maven helps you manage the dependencies and build the application artifacts (and many more...). You may read more in the Maven cookbook.
 
Saloon Keeper
Posts: 28328
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maven was designed, in fact, precisely to save you this kind of pain.

You can use the special Maven goal "eclipse:eclipse" to have Maven construct the necessary files to make a Maven project eclipse-friendly. There's also an IntelliJ goal for that IDE.

I have some very complex projects. They're built on Spring, Hibernate, JBoss RichFaces, and often include additional subsystems like javamail and Quartz Scheduler. It can occasionally be frustrating, because once you get that much stuff in one app, they can start fighting over conflicts on shared resource versions. But one of the strengths of Maven is that once you find a "magic combination", Maven will lock the project to the specified versions and not break as soon as one of the contributing components gets updated.

Of course, finding the magic combinations is the real challenge. Usually I end up reading other people's blogs. Shared suffering.

One thing that can really help you get started is archetypes. There are quite a few published archetypes for different types of Maven projects. Plus, it's actually pretty easy to define your own. Although a lot of my webapps have been simply cloned from earlier maven projects, occasionally, I'll use an archetype to start a project from scratch.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe I am misunderstanding what you are attempting to accomplish, but it sounds as if you have a project that uses Maven for building, and now you and to extend it or add new functionality. The statement "Can I use maven, somehow, in order to start developing a more real app from this test app" implies that Maven can help you write an app; it can't. What Maven can do is manage your dependencies. But the app itself you have to write. What Maven can help you with is adding new JARs to your app when you need to make use of them (for example, you need the commons math library but it isn't included in the build path yet).

What reading have you done on Maven? Is this your first attempt on working with a Maven project?
 
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic