aha.  okay i had my parent pom called generic-pom.xml as I was only interesed in building some of our 'generic' projects for now.

just to get a first-stab working i have renamed it to pom.xml and moved my local folder heirarchy about a bit and voila - it seems to work when i run mvn test

but when i run mvn install from the parent it complains that there are no source directories to process for checkstyle - that's right the only thing in the parent is the pom.xml file.

is that a bug in checkstyle, or a design feature that build plugins in a parent pom actually expect something to be in the parent project folder other than the pom.

in general I am going to want to put all common build, test and reporting config in an otherwise void parent project and extend as needed in sub-projects  is that not the right idea?  maybe i have misunderstood it.

on this point, say i have set up checktyle in the master pom but for some reason checktyle crashes while processing a sub-project (it happens if there are way too many checktyle errors for examplek that it can run out of memory.) is there a way of subtractively extending the parent, ie to tell one specific sub-project not to generate a checkstyle report, or would i have to remove it from the master and add it in to all sub-projects by hand until the offending project has been fixed?

Kind regards,
Dave Sag




 


"Brian E. Fox" <[EMAIL PROTECTED]> wrote on 01-03-2006 14:33:40:

> It will try to find the parent at ../pom.xml and then look in the
> local repository. If you never built the parent before and you don't
> have the pom one folder up, then it won't work. The safest thing is
> to keep your parent pom immediately above your children:
>
> Parent pom.xml
>      module a
>         module b
>         sub modules parent pom.xml
>                     sub a
>                     sub b
>
> etc
>
> -----Original Message-----
> From: Piéroni Raphaël [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 01, 2006 8:14 AM
> To: Maven Users List
> Subject: Re: [m2] multi-project problems
>
> Hi Dave,
>
> Have you tryed to call mvn install from the parent directory ?
>
> You can also reference the parent by adding a <relativePath> in the
> parent definition in the child pom. (never used it myself)
>
> May that helps.
>
> Raphaël
>
> 2006/3/1, David Sag <[EMAIL PROTECTED]>:
> >
> >
> > Dear people,
> >
> > I am having my first proper stab at doing a milti-project build, but
> > naturally have hit some immediate problems.
> >
> > Firstly I have scoured the maven site and google but can't find any
> > sound documentation on how the multi-project builds are meant to work.  
> > I did find this page
> > http://maven.apache.org/guides/mini/guide-multi-module.html but it's a
> > little low on detail.
> >
> > But from the bits and pieces I could patch together from this mailing
> > list I have done the following.
> >
> > I have created a master pom.xml file that specifies
> >
> > packaging: pom
> > version: 2.3-SNAPSHOT (i just made this up for now - yes snapshots are
> > working)
> > url: a url for the group of projects
> > description: a description for the group of projects
> > modules: i just listed one module for now
> > issueManagement: same for all projects so i put it here
> > ciManagement: same for all projects so i put that here too
> > organization: EPO
> > developers: mostly the same for all projects with a few exceptions.
> >     should I put all of the developers who are common to all projects here
> >     and then add specific decelopers to the sub-poms on a
> >     project by project basis?
> > ditto for contributors
> > build: the build plugins are the same for all projects
> > profiles: once again same for all projects, excpet for the
> >     distributionManagement which varies from one project to the next.
> >     if i list the main profile definition here can i just override a
> > profile
> >     defn with the same id in a sub-pom to add the
> > distributionManagement data?
> > dependencies: junit and some of the commons libs are common to all
> > projects
> >     assume i declare them here and then declare any additional ones i
> > need in
> >     a sub-pom.
> > reporting: the same for all projects so I put that here.
> >
> > in my sub-project's pom i have pulled out everything that's already in
> > the parent. I am not sure what to put in the 'parent' tag though, but
> > tried setting a parent with the same groupId and artifactId and
> > version as my parent pom file.
> >
> > when i try to build now however, the first thing maven does is
> > complain it can't download the parent project from any of the
> > repositories and then it gives up.
> >
> > naturally the parent is not in any repository as it has never ever
> > been built before.
> >
> > so I tried just commenting out the reference to parent in the
> > sub-project and then, using the parent pom, mvn clean works fine but
> > compiling fails as it is not picking up any of the parent
> > dependencies.
> >
> > i checked in the maven plugin's project to see how you do it there and
> > i note that the version listed as the ant plugin's pom's parent is 2.0
> > but the parent pom itself has a version 2.0.1
> >
> > Could someone please exaplain how this is all meant to work?
> >
> > cheers
> >
> > dave
> >
> >
> > Kind regards,
> > Dave Sag
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to