..Or pay for Clover if this is a serious, for-work, for-profit project... And if its an open-source project, then ask Clover for a free OSS license.
wf On 3/22/06, John Allen <[EMAIL PROTECTED]> wrote: > I have tried to use the cobertura plugin for reporting and goverance > enforcement but im afraid its a none starter, when run in reactor builds you > get a 'can not overwrite readonly parameter testClassPathElements' (or > alike) when generating sites and the check goal fails to interoperate with > the site generation as well. Set your clock back to Jan and use the clover > plugin, it works a treat - hopefully cobertura will sort its m2 support out > in the near future (note the clock adjustment is tongue in cheak and only > something i resort to for demonstration purposes). > > John > > > ----- Original Message ----- > From: "Lee Meador" <[EMAIL PROTECTED]> > To: "Maven Users List" <[email protected]> > Sent: Wednesday, March 01, 2006 6:52 PM > Subject: Re: [m2] multi-project problems > > > >I would love to see an example of the pom content(s) for a working > >Cobertura > > report on a multi-project setup. > > > > On 3/1/06, David Sag <[EMAIL PROTECTED]> wrote: > >> > >> > >> Interesting - for me it's the cobertura report that is breaking my > >> overall > >> site build. i'll have to experiment offline for a few days tho as I am > >> about to be away. seems strange to have a different general philosophy > >> for > >> reports as for build. indeed i find it odd that the reporting is so > >> clearly > >> separate from the overall build lifecycle. almost like it was an > >> afterthought. for me the reports are the most important part of a build. > >> > >> Kind regards, > >> Dave Sag > >> > >> > >> > >> > >> > >> > >> [EMAIL PROTECTED] wrote on 01-03-2006 17:12:36: > >> > >> > >> > Here is a section from my parent pom.xml that causes all the reports to > >> run > >> > on the parent and alll the children. The parent has no source and so > >> > checkstyle complains but it doesn't kill the site build and continues > >> on. > >> > The generated site does end up with some links in the left sidebar that > >> go > >> > nowhere though. I just live with it. > >> > > >> > One thing (or two) to note is that the changelog report requires a > >> > valid > >> > <scm> section in the pom. I also have a <distributionManagement><site> > >> > section in each of the poms (parent and child) to tell the site:deploy > >> > target where to put the generated stuff on my site server. That may be > >> > because of the way I have done things and not really be required. You > >> get to > >> > fiddling around with the maven setup and when it works good enough it > >> gets > >> > frozen without any backtracking to do it a better way. > >> > > >> > <reporting> > >> > <plugins> > >> > <plugin> > >> > <groupId>org.codehaus.mojo</groupId> > >> > <artifactId>jxr-maven-plugin</artifactId> > >> > </plugin> > >> > <plugin> > >> > <groupId>org.apache.maven.plugins</groupId> > >> > <artifactId>maven-javadoc-plugin</artifactId> > >> > <configuration> > >> > <source>1.4</source> > >> > </configuration> > >> > </plugin> > >> > <plugin> > >> > <groupId>org.apache.maven.plugins</groupId> > >> > > >> <artifactId>maven-project-info-reports-plugin</artifactId> > >> > </plugin> > >> > <plugin> > >> > <groupId>org.codehaus.mojo</groupId> > >> > <artifactId>surefire-report-maven-plugin</artifactId> > >> > </plugin> > >> > <plugin> > >> > <groupId>org.apache.maven.plugins</groupId> > >> > <artifactId>maven-checkstyle-plugin</artifactId> > >> > <configuration> > >> > <configLocation>../AA-IFS-checkstyle-rules.xml > >> > </configLocation> > >> > <headerLocation>../license.txt</headerLocation> > >> > </configuration> > >> > </plugin> > >> > <plugin> > >> > <groupId>org.codehaus.mojo</groupId> > >> > <artifactId>changelog-maven-plugin</artifactId> > >> > </plugin> > >> > </plugins> > >> > </reporting> > >> > > >> > On 3/1/06, Brian E. Fox <[EMAIL PROTECTED]> wrote: > >> > > > >> > > There might be a reportManagement section, there is a > >> dependencyManagement > >> > > section. Take a look at the project descriptor under "where is it" on > >> the > >> > > maven page. > >> > > > >> > > ________________________________ > >> > > > >> > > From: David Sag [mailto:[EMAIL PROTECTED] > >> > > Sent: Wednesday, March 01, 2006 10:40 AM > >> > > To: Maven Users List > >> > > Subject: RE: [m2] multi-project problems > >> > > > >> > > > >> > > > >> > > Hi Brian, > >> > > > >> > > Your suggestion worked well, while it's not quite what I was after (I > >> > > wanted to leave the build details out of the sub-project altogether) > >> but > >> > > hey, we can't always get what we want. > >> > > > >> > > But there is no equivalent for the reporting section of the pom. how > >> do I > >> > > define a standard suite of reports in a parent pom? or failing that > >> at > >> > > least define how the report plugins are configured in the parent. > >> > > > >> > > any tips? > >> > > > >> > > Kind regards, > >> > > Dave Sag > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > "Brian E. Fox" <[EMAIL PROTECTED]> wrote on 01-03-2006 > >> 15:28:25: > >> > > > >> > > > if you put something in the plugins section of the parent, it will > >> > > > run with the parent. To do what you want, you should put the config > >> > > > in the parent's pluginManagement section. Then in each child you > >> > > > just need to put the plugin group and id in the build/plugin > >> > > > section > >> > > > but the configuration will be inherited. > >> > > > > >> > > > ________________________________ > >> > > > > >> > > > From: David Sag [mailto:[EMAIL PROTECTED] > >> > > > Sent: Wednesday, March 01, 2006 8:49 AM > >> > > > To: Maven Users List > >> > > > Subject: RE: [m2] multi-project problems > >> > > > > >> > > > > >> > > > > >> > > > 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] > >> > > > > > >> > > > > >> > > > >> > > > >> > > > >> > > >> > > >> > -- > >> > -- Lee Meador > >> > Sent from gmail. My real email address is [EMAIL PROTECTED] > >> > > > > > > > > -- > > -- Lee Meador > > Sent from gmail. My real email address is [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
