1) M2Eclipse handles this reasonably well. However, you need to insert a new folder level in your workspace hierarchy,where you put the aggregator pom. Then the modules go below that folder.
/Anders On Wed, Nov 11, 2009 at 03:41, EJ Ciramella <[email protected]> wrote: > 1 - not entirely sure how well eclipse plays with aggregator poms. > 4 - we didn't build anything, it already exists. > > Much like any system overhaul, if I were in your shoes, I'd work on a proof > of concept example in a branch off of your mainline (maybe based on a known > good release label). From there you can tinker at will and try and answer > these two particular questions with exact details with regard to your > company's code/structure/etc. > > There's always the better builds with maven book as well ;-) > > -----Original Message----- > From: Takapa [mailto:[email protected]] > Sent: Tuesday, November 10, 2009 9:15 PM > To: [email protected] > Subject: RE: How do I get started on Maven? > > > Thanks for your detailed and well thought out reply. > > I have a small follow up questions, if you have time to answer: > > In your answer to question 1, you said "and one aggregator pom at the top > level". I take it you mean that the top level pom should be in the root > workspace folder? If so, how does Eclipse manage this? That is, Eclipse can > only display projects within the workspace folder (usually), but does not > display random files or folders manually created in the workspace folder > unless they are project folders 'added' to the workspace. > > In your answer to question 4, you mentioned that you built a plug-in for > building your OSGi libraries. Can you tell me if there are existing OSGi > plugins that will do this, and if so, why you made the decision to develop > a > special OSGi build/packaging plugin. > > Thanks, > > Chris > > > > EJ Ciramella-3 wrote: > > > > 1) How many .pom files do I need and at what level should they be at, can > > someone copy and paste my directory structure and detail where the .pom > > files should be? > > > > -- From the hip, at least 5 (one for each module and one aggregator pom > at > > the top level) - but depending on what else your company is doing or your > > own preferences, you may create parent/class type poms that define things > > for future osgi modules outside of this particular tree. > > > > > > 2) How do I configure Eclipse to build using Maven? Can I still > > incrementally compile with Eclipse? > > > > -- the m2eclipse plugin is pretty slick and yes, you can still > > incrementally build. > > > > 3) Is Maven OK to use with OSGi projects? > > 4) I need to perform some custom steps in the building on my OSGi jars, > do > > I > > need to write my own plugin? > > > > -- we do, google felix/osgi > > > > 5) The jars that I am using are my own proprietary jars, do I need to > > setup > > a local repository somewhere, if so, how? > > > > -- You should - regardless - to get the proxy benefits. Google up > > artifactory/nexus/archiva (we use archiva but are looking to > > upgrade/migrate to nexus) > > > > 6) If I was to solve the same problem with Ant, would it be a better fit? > > If > > so, how? > > > > -- not so sure, but you'd have to provide a proof of concept to tell. As > > an aside, there are lots of time (especially recently) that I've wished > we > > used ant+ivy instead of maven 2 for the transparency of what the tool is > > doing, full control of the lifecycle, etc. You may find it's a better > > fit. But depending on what you do, you may find your build.xml files > grow > > to 1205298698 lines before you know it (vs. pom.xml files that stay > really > > small > > and neat). > > > > -- eventually, you'll find other concerns like, how do I release some > > module? Does the "maven way" fit well with "our way"? What about site > > output? How many revisions should we keep of everything? Etc. etc. It > > was a pretty big train wreck years ago when people were used to typing > > "ant build-something" to "mvn install" - maven repurposes some pretty > > common terms, so a slight relearning is required (not the end of the > world > > - but be prepared for resistance). More than any other tip out there, > > give it a try. Take a look at "mvn archetype:generate" > > > > -----Original Message----- > > From: Takapa [mailto:[email protected]] > > Sent: Tuesday, November 10, 2009 11:58 AM > > To: [email protected] > > Subject: How do I get started on Maven? > > > > > > Hello all, > > > > I'm a complete beginner to Maven but I have a project that requires it I > > think, but I have a few questions (as I cannot figure it out from the > > website): > > > > I have a quite complex codebase where I have a series of projects (in > > Eclipse), each of which represents a seperate OSGi service with seperate > > dependancies. Some of the projects are dependant on each other. Some are > > dependant on external OSGi libraries. > > > > I wish to know how I can configure Maven to make my life easier and to > > take > > this config management nightmare away. > > > > Questions (question 1 is the most importand if all the questions are too > > daunting): > > > > 1) How many .pom files do I need and at what level should they be at, can > > someone copy and paste my directory structure and detail where the .pom > > files should be? > > 2) How do I configure Eclipse to build using Maven? Can I still > > incrementally compile with Eclipse? > > 3) Is Maven OK to use with OSGi projects? > > 4) I need to perform some custom steps in the building on my OSGi jars, > do > > I > > need to write my own plugin? > > 5) The jars that I am using are my own proprietary jars, do I need to > > setup > > a local repository somewhere, if so, how? > > 6) If I was to solve the same problem with Ant, would it be a better fit? > > If > > so, how? > > > > My current folder structure: > > > > /workspacefolder > > /osgiService1 > > /bin > > /dist > > /lib > > lib1_1.0.0.jar > > lib2_1.0.0.jar > > /src > > /osgiService2 > > /bin > > /dist > > /lib > > lib2_1.0.0.jar > > lib3_1.0.0.jar > > > > /src > > /osgiService3 > > /bin > > /dist > > /lib > > lib3_1.0.1.jar > > lib4_1.0.0.jar > > /src > > /osgiService4 > > /bin > > /dist > > /lib > > lib4_1.0.0.jar > > lib5_1.0.0.jar > > /src > > > > > > Thanks so much, > > > > Chris > > -- > > View this message in context: > > > http://old.nabble.com/How-do-I-get-started-on-Maven--tp26287089p26287089.html > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > > -- > View this message in context: > http://old.nabble.com/How-do-I-get-started-on-Maven--tp26287089p26294443.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
