Re: [m2] multi-project problems
actually I just dumped clover for cobertura because it couldn't handle some of our (admitedly crappy) legacy code. - BP On 3/22/06, Wayne Fay [EMAIL PROTECTED] wrote: ..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 users@maven.apache.org 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 distributionManagementsite 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 groupIdorg.codehaus.mojo/groupId artifactIdjxr-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration source1.4/source /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocation../AA-IFS-checkstyle-rules.xml /configLocation headerLocation../license.txt/headerLocation /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdchangelog-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
Re: [m2] multi-project problems
except reports, there is no way of setting standard reports or a common configuration for them in parent projects (ie there is no reportingManagement) which results in quite a bit of duplication in leaf projects. John - Original Message - From: Brian E. Fox [EMAIL PROTECTED] To: Maven Users List users@maven.apache.org Sent: Wednesday, March 01, 2006 2:28 PM Subject: RE: [m2] multi-project problems 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
Re: [m2] multi-project problems
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 users@maven.apache.org 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 distributionManagementsite 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 groupIdorg.codehaus.mojo/groupId artifactIdjxr-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration source1.4/source /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocation../AA-IFS-checkstyle-rules.xml /configLocation headerLocation../license.txt/headerLocation /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdchangelog-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
Re: [m2] multi-project problems
..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 users@maven.apache.org 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 distributionManagementsite 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 groupIdorg.codehaus.mojo/groupId artifactIdjxr-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration source1.4/source /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocation../AA-IFS-checkstyle-rules.xml /configLocation headerLocation../license.txt/headerLocation /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdchangelog-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
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
RE: [m2] multi-project problems
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]
Re: [m2] multi-project problems
Okay that's going to be useful to know as I know in the mid-term i do not have the freedom to change the project heiracrchies. do you (and any other interested reader) have any pointers on docs relating to the config of the parent tag in a sub-project? Kind regards, Dave Sag Piéroni Raphaël [EMAIL PROTECTED] wrote on 01-03-2006 14:14:29: 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
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
RE: [m2] multi-project problems
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
RE: [m2] multi-project problems
Hi Brian, thanks for that tip - i'll give it a try now. where are you getting this knowledge from? hard-won experience or is there a docuement somewhere I could read? 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
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
RE: [m2] multi-project problems
ha. hard-won experience. From: David Sag [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 9:51 AM To: Maven Users List Subject: RE: [m2] multi-project problems Hi Brian, thanks for that tip - i'll give it a try now. where are you getting this knowledge from? hard-won experience or is there a docuement somewhere I could read? 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
RE: [m2] multi-project problems
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
RE: [m2] multi-project problems
Yep I looked there but no-dice. I'll have to give up on this now as I am offline until mid-next week. thanks for your help and perhaps (fingers xxed) someone who's actually done what I am trying to do (use a master pom.xml to define all common build/dependency/reporting/profile/developer details, thus making the poms for each subproject very very simple and generate a common and consistent suite of build-artifacts and reports) will post to this list with some definitive answers. thanks for your help however. I am documenting all of this as I go as I need to write up impact assesments later this month and assess at that point if we migrate to m2 or stick with ant. so far it's much simpler to just import an ant script with the appropriate reporting targets from a common location than it is to set up pom-inheritance. but that's probably because I still don't really know what I am doing with m2. (and that's partially because every time i want to try something new i need to research it and often end up having to write my own documentation, wheras Ant is very well understood by everyone here and there is a vast existing base [spaghetti mostly] of ant scripts.) if i can get what i want to work working i am happy to contribute documentation to the maven project. but i am still not sure i have my head in the right place to qualify myself for that task. Kind regards, Dave Sag Brian E. Fox [EMAIL PROTECTED] wrote on 01-03-2006 16:56:41: 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
Re: [m2] multi-project problems
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 distributionManagementsite 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 groupIdorg.codehaus.mojo/groupId artifactIdjxr-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration source1.4/source /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocation../AA-IFS-checkstyle-rules.xml /configLocation headerLocation../license.txt/headerLocation /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdchangelog-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
Re: [m2] multi-project problems
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 distributionManagementsite 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 groupIdorg.codehaus.mojo/groupId artifactIdjxr-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration source1.4/source /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocation../AA-IFS-checkstyle-rules.xml /configLocation headerLocation../license.txt/headerLocation /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdchangelog-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
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 distributionManagementsite 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 groupIdorg.codehaus.mojo/groupId artifactIdjxr-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-javadoc-plugin/artifactId configuration source1.4/source /configuration /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-project-info-reports-plugin/artifactId /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdsurefire-report-maven-plugin/artifactId /plugin plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-checkstyle-plugin/artifactId configuration configLocation../AA-IFS-checkstyle-rules.xml /configLocation headerLocation../license.txt/headerLocation /configuration /plugin plugin groupIdorg.codehaus.mojo/groupId artifactIdchangelog-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