Re: Project Inheritance in Maven
On Tue, Dec 23, 2008 at 8:36 AM, arun_rocky wrote: > 1) I have created a parent maven project and i called the pom.xml file in > child maven project. > by using the . its working fine. but i cant able to > retrieve the user-created classes of parent maven project in child maven > project. i got only the package name and i didnt the got classes which is > there inside in the maven-parent project. It sounds like you need to declare it as a , not as the . > 2) can we able to create two war/jar(child and parent project separately) > files by running the child maven project only.please help me out .. If you want to build the parent, you'll need to execute Maven at that level. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Project Inheritance in Maven
hi, 1) I have created a parent maven project and i called the pom.xml file in child maven project. by using the . its working fine. but i cant able to retrieve the user-created classes of parent maven project in child maven project. i got only the package name and i didnt the got classes which is there inside in the maven-parent project. 2) can we able to create two war/jar(child and parent project separately) files by running the child maven project only.please help me out .. -- View this message in context: http://www.nabble.com/Project-Inheritance-in-Maven-tp21146454p21146454.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: assembly plugin and project inheritance
Stephen is correct. The other subtle difference is that using the xxx-dependencies forces you to declare a dependency and then maven can reorder reactor builds appropriately. There is currently no way for the dependency plugin to interact with the reactor order in 2.0. -Original Message- From: Stephen Connolly [mailto:[EMAIL PROTECTED] Sent: Sunday, February 24, 2008 4:09 PM To: Maven Users List Subject: Re: assembly plugin and project inheritance Copy requires that the artifact must be in the local repository or in a remote repository. The copy dependencies allows for the artifact to come from the reactor, so you don't have to install the artifact into your local repository. The copy dependencies can be set to only copy one dependency. Trust me, this is the better way to do it. -Stephen On Sat, Feb 23, 2008 at 9:38 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > Thank you very much for your help, I can now have many projects generate > the right assembly with just one assembly descriptor and without > requiring to check out multiple projects (and having them at the right > position in the directory structure). > > I don't understand your suggestion to use copy-dependencies, what I'm > doing is copying a single resource (the assembly descriptor) and not all > of the dependencies. The copy goal seems to do its job. > > Cheers, > reto > > > > Stephen Connolly wrote: > > there are two sets of goals in the maven dependency plugin. > > > > the first set are copy and unpack. you specify the artifacts inside > > the plugin configuration. these are not the set you want. the set you > > want are copy-dependencies (or something like that I am on my iPod so > > you will have to check) with this set you add the dependency to the > > pom. that will force maven to sequence things correctly for you. > > > > the build helper plugin has a default phase, so leave that alone. I > > would bind the dependency plugin to one of the generate phases > > (sources or resources) > > > > Stephen > > 2/22/08, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > > > >> The version I posted doesn't work as the child-projects can't perform > >> the attach-artifact attached to the package phase. > >> > >> I've now extracted the dist configuration and the attachment of it to a > >> separate project[1]. Having done this I also attached the copy and the > >> assembly goals to the compile and package phases [2]. > >> > >> > >> 1. > >> > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps-assembly/trunk/pom.xml > >> 2. in > >> > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml > >> > >> > >> Reto Bachmann-Gmür wrote: > >> > >>> Thanks Stephen, > >>> > >>> trying to follow the path you describe I added the following to the > >>> parent-pom: > >>> > >>> > >>> org.codehaus.mojo > >>> build-helper-maven-plugin > >>> > >>> > >>> attach-artifacts > >>> package > >>> > >>> attach-artifact > >>> > >>> > >>> > >>> > >>> src/assembly/dist.xml > >>> xml > >>> > >>> assembly-descriptor > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> and > >>> > >>> org.apache.maven.plugins > >>> maven-dependency-plugin > >>> > >>> > >>> > >>> org.wymiwyg.rwcf > >>> rwcf-apps > >>> 0.0.1 > >>> xml > >>> assembly-descriptor > >>> false > >>> > >>> ${project.build.directory}/src/assembly/ > >>> > >>> dist.xml > >>> > >>> > >>> > >>> > >>> > >>> furthermore I changed the descriptor of maven-assembly-plugin to use > >>> ${project.build.directory}/src/assembly/dist.xml. I didn't change > >>> anything to the child-projects. > >>> > >>> I can now execute "mvn clean dependency:copy assembly:assembly" for > >>> child projects to create a distribution-package. > >>> > >>> The only thing which I'm still insecure is about attaching this to > >>> phases, the difficulty seems that the super project doesn't need to > >>> have this
Re: assembly plugin and project inheritance
If you do something like org.apache.maven.plugins maven-dependency-plugin *assembly-descriptor*** ...** copy-dependencies That will only copy the assembly-descriptor dependencies of your module On Sun, Feb 24, 2008 at 9:09 PM, Stephen Connolly < [EMAIL PROTECTED]> wrote: > Copy requires that the artifact must be in the local repository or in a > remote repository. > > The copy dependencies allows for the artifact to come from the reactor, so > you don't have to install the artifact into your local repository. > > The copy dependencies can be set to only copy one dependency. > > Trust me, this is the better way to do it. > > -Stephen > > > On Sat, Feb 23, 2008 at 9:38 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > > > Thank you very much for your help, I can now have many projects generate > > the right assembly with just one assembly descriptor and without > > requiring to check out multiple projects (and having them at the right > > position in the directory structure). > > > > I don't understand your suggestion to use copy-dependencies, what I'm > > doing is copying a single resource (the assembly descriptor) and not all > > of the dependencies. The copy goal seems to do its job. > > > > Cheers, > > reto > > > > > > > > Stephen Connolly wrote: > > > there are two sets of goals in the maven dependency plugin. > > > > > > the first set are copy and unpack. you specify the artifacts inside > > > the plugin configuration. these are not the set you want. the set you > > > want are copy-dependencies (or something like that I am on my iPod so > > > you will have to check) with this set you add the dependency to the > > > pom. that will force maven to sequence things correctly for you. > > > > > > the build helper plugin has a default phase, so leave that alone. I > > > would bind the dependency plugin to one of the generate phases > > > (sources or resources) > > > > > > Stephen > > > 2/22/08, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > > > > > >> The version I posted doesn't work as the child-projects can't perform > > >> the attach-artifact attached to the package phase. > > >> > > >> I've now extracted the dist configuration and the attachment of it to > > a > > >> separate project[1]. Having done this I also attached the copy and > > the > > >> assembly goals to the compile and package phases [2]. > > >> > > >> > > >> 1. > > >> > > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps-assembly/trunk/pom.xml > > >> 2. in > > >> > > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml > > >> > > >> > > >> Reto Bachmann-Gmür wrote: > > >> > > >>> Thanks Stephen, > > >>> > > >>> trying to follow the path you describe I added the following to the > > >>> parent-pom: > > >>> > > >>> > > >>> org.codehaus.mojo > > >>> build-helper-maven-plugin > > >>> > > >>> > > >>> attach-artifacts > > >>> package > > >>> > > >>> attach-artifact > > >>> > > >>> > > >>> > > >>> > > >>> src/assembly/dist.xml > > >>> xml > > >>> > > >>> assembly-descriptor > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> and > > >>> > > >>> org.apache.maven.plugins > > >>> maven-dependency-plugin > > >>> > > >>> > > >>> > > >>> org.wymiwyg.rwcf > > >>> rwcf-apps > > >>> 0.0.1 > > >>> xml > > >>> assembly-descriptor > > >>> false > > >>> > > >>> ${project.build.directory}/src/assembly/ > > >>> > > >>> dist.xml > > >>> > > >>> > > >>> > > >>> > > >>> > > >>> furthermore I changed the descriptor of maven-assembly-plugin to use > > >>> ${project.build.directory}/src/assembly/dist.xml. I didn't change > > >>> anything to the child-projects. > > >>> > > >>> I can now execute "mvn clean dependency:copy assembly:assembly" for > > >>> child projects to create a distribution-package. > > >>> > > >>> The only thing which I'm still insecure is about attaching this to > > >>> phases, the difficulty seems that the super project doesn't need to > > >>> have this attached to any phase, and the dependency resolution fails > > >>> unless executed after install (a solution might be to split the > > parent > > >>> into a grand-parent providing the assembly descriptor and binding it > > >>> to phases in the intermediate parent). But I'm not sure anyway in > > >>> which phase to best create zip and tar. > > >>> > > >>> Cheers, > > >>> reto > > >>> > > >>> Stephen Connolly wrote: > > >>> > > You could attach the common descriptor as a build artifact one > > module, and > > then use the dependency plugin to pull it down to each child > > module. > > > > i.e. > > > > Use buildhelper-maven-plugin in rwcf-apps to attach dist.xml with a > > classifier of, e.g. assembly-descriptor. > > Now when you run mvn install or mvn deploy on rwcf-apps the > > des
Re: assembly plugin and project inheritance
Copy requires that the artifact must be in the local repository or in a remote repository. The copy dependencies allows for the artifact to come from the reactor, so you don't have to install the artifact into your local repository. The copy dependencies can be set to only copy one dependency. Trust me, this is the better way to do it. -Stephen On Sat, Feb 23, 2008 at 9:38 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > Thank you very much for your help, I can now have many projects generate > the right assembly with just one assembly descriptor and without > requiring to check out multiple projects (and having them at the right > position in the directory structure). > > I don't understand your suggestion to use copy-dependencies, what I'm > doing is copying a single resource (the assembly descriptor) and not all > of the dependencies. The copy goal seems to do its job. > > Cheers, > reto > > > > Stephen Connolly wrote: > > there are two sets of goals in the maven dependency plugin. > > > > the first set are copy and unpack. you specify the artifacts inside > > the plugin configuration. these are not the set you want. the set you > > want are copy-dependencies (or something like that I am on my iPod so > > you will have to check) with this set you add the dependency to the > > pom. that will force maven to sequence things correctly for you. > > > > the build helper plugin has a default phase, so leave that alone. I > > would bind the dependency plugin to one of the generate phases > > (sources or resources) > > > > Stephen > > 2/22/08, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > > > >> The version I posted doesn't work as the child-projects can't perform > >> the attach-artifact attached to the package phase. > >> > >> I've now extracted the dist configuration and the attachment of it to a > >> separate project[1]. Having done this I also attached the copy and the > >> assembly goals to the compile and package phases [2]. > >> > >> > >> 1. > >> > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps-assembly/trunk/pom.xml > >> 2. in > >> > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml > >> > >> > >> Reto Bachmann-Gmür wrote: > >> > >>> Thanks Stephen, > >>> > >>> trying to follow the path you describe I added the following to the > >>> parent-pom: > >>> > >>> > >>> org.codehaus.mojo > >>> build-helper-maven-plugin > >>> > >>> > >>> attach-artifacts > >>> package > >>> > >>> attach-artifact > >>> > >>> > >>> > >>> > >>> src/assembly/dist.xml > >>> xml > >>> > >>> assembly-descriptor > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> and > >>> > >>> org.apache.maven.plugins > >>> maven-dependency-plugin > >>> > >>> > >>> > >>> org.wymiwyg.rwcf > >>> rwcf-apps > >>> 0.0.1 > >>> xml > >>> assembly-descriptor > >>> false > >>> > >>> ${project.build.directory}/src/assembly/ > >>> > >>> dist.xml > >>> > >>> > >>> > >>> > >>> > >>> furthermore I changed the descriptor of maven-assembly-plugin to use > >>> ${project.build.directory}/src/assembly/dist.xml. I didn't change > >>> anything to the child-projects. > >>> > >>> I can now execute "mvn clean dependency:copy assembly:assembly" for > >>> child projects to create a distribution-package. > >>> > >>> The only thing which I'm still insecure is about attaching this to > >>> phases, the difficulty seems that the super project doesn't need to > >>> have this attached to any phase, and the dependency resolution fails > >>> unless executed after install (a solution might be to split the parent > >>> into a grand-parent providing the assembly descriptor and binding it > >>> to phases in the intermediate parent). But I'm not sure anyway in > >>> which phase to best create zip and tar. > >>> > >>> Cheers, > >>> reto > >>> > >>> Stephen Connolly wrote: > >>> > You could attach the common descriptor as a build artifact one > module, and > then use the dependency plugin to pull it down to each child module. > > i.e. > > Use buildhelper-maven-plugin in rwcf-apps to attach dist.xml with a > classifier of, e.g. assembly-descriptor. > Now when you run mvn install or mvn deploy on rwcf-apps the > descriptor will > be published to the maven repository (local or remote respectively) > > Then in one of the modules that you want to use this common > descriptor, add > a dependency on the rwcf-apps with a type of assembly-descriptor, you > use > maven-dependency-plugin to copy the dependency to your target > directory, and > then your pom just directs the assembly plugin to use that > descriptor. > > -Stephen > > On Thu, Feb 21, 2008 at 8:47 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> > wrote: > > > > > Hello > > > > I'm having many projects that share some dependencies and that > > should be > > packaged the same way. So I wanted to have a parent project > c
Re: assembly plugin and project inheritance
Thank you very much for your help, I can now have many projects generate the right assembly with just one assembly descriptor and without requiring to check out multiple projects (and having them at the right position in the directory structure). I don't understand your suggestion to use copy-dependencies, what I'm doing is copying a single resource (the assembly descriptor) and not all of the dependencies. The copy goal seems to do its job. Cheers, reto Stephen Connolly wrote: there are two sets of goals in the maven dependency plugin. the first set are copy and unpack. you specify the artifacts inside the plugin configuration. these are not the set you want. the set you want are copy-dependencies (or something like that I am on my iPod so you will have to check) with this set you add the dependency to the pom. that will force maven to sequence things correctly for you. the build helper plugin has a default phase, so leave that alone. I would bind the dependency plugin to one of the generate phases (sources or resources) Stephen 2/22/08, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: The version I posted doesn't work as the child-projects can't perform the attach-artifact attached to the package phase. I've now extracted the dist configuration and the attachment of it to a separate project[1]. Having done this I also attached the copy and the assembly goals to the compile and package phases [2]. 1. http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps-assembly/trunk/pom.xml 2. in http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml Reto Bachmann-Gmür wrote: Thanks Stephen, trying to follow the path you describe I added the following to the parent-pom: org.codehaus.mojo build-helper-maven-plugin attach-artifacts package attach-artifact src/assembly/dist.xml xml assembly-descriptor and org.apache.maven.plugins maven-dependency-plugin org.wymiwyg.rwcf rwcf-apps 0.0.1 xml assembly-descriptor false ${project.build.directory}/src/assembly/ dist.xml furthermore I changed the descriptor of maven-assembly-plugin to use ${project.build.directory}/src/assembly/dist.xml. I didn't change anything to the child-projects. I can now execute "mvn clean dependency:copy assembly:assembly" for child projects to create a distribution-package. The only thing which I'm still insecure is about attaching this to phases, the difficulty seems that the super project doesn't need to have this attached to any phase, and the dependency resolution fails unless executed after install (a solution might be to split the parent into a grand-parent providing the assembly descriptor and binding it to phases in the intermediate parent). But I'm not sure anyway in which phase to best create zip and tar. Cheers, reto Stephen Connolly wrote: You could attach the common descriptor as a build artifact one module, and then use the dependency plugin to pull it down to each child module. i.e. Use buildhelper-maven-plugin in rwcf-apps to attach dist.xml with a classifier of, e.g. assembly-descriptor. Now when you run mvn install or mvn deploy on rwcf-apps the descriptor will be published to the maven repository (local or remote respectively) Then in one of the modules that you want to use this common descriptor, add a dependency on the rwcf-apps with a type of assembly-descriptor, you use maven-dependency-plugin to copy the dependency to your target directory, and then your pom just directs the assembly plugin to use that descriptor. -Stephen On Thu, Feb 21, 2008 at 8:47 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: Hello I'm having many projects that share some dependencies and that should be packaged the same way. So I wanted to have a parent project configuring the maven-assembly-plugin. I did this with the following in the parent pom: maven-assembly-plugin ../rwcf-apps/src/assembly/dist.xml This only works when the parent is checked out in a sibling directory of the child. If one just check out a child project without checking out the parent assembly:assembly wont work. Things work using a descriptorRef but the predefined descriptors don't do what I'm looking for. Possibly ways to solve the issues might be: * have the plugin look up the descriptor from the parent rather * reference a descriptor with an http uri * include the content of descriptor directly in the pom ...but I didn't find a way to do it in any of these ways. Any suggestion on how to make it possible to check out a single child-project and being able to assemble it? If you would like to know more precisely what I'm doing, you may look at * The descriptor: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/src/assembly/dist.xml * The parent pom: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml * A child pom: https://knobot.svn.sourceforge.net/svnroot/knobot
Re: assembly plugin and project inheritance
there are two sets of goals in the maven dependency plugin. the first set are copy and unpack. you specify the artifacts inside the plugin configuration. these are not the set you want. the set you want are copy-dependencies (or something like that I am on my iPod so you will have to check) with this set you add the dependency to the pom. that will force maven to sequence things correctly for you. the build helper plugin has a default phase, so leave that alone. I would bind the dependency plugin to one of the generate phases (sources or resources) Stephen 2/22/08, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > The version I posted doesn't work as the child-projects can't perform > the attach-artifact attached to the package phase. > > I've now extracted the dist configuration and the attachment of it to a > separate project[1]. Having done this I also attached the copy and the > assembly goals to the compile and package phases [2]. > > > 1. > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps-assembly/trunk/pom.xml > 2. in > http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml > > > Reto Bachmann-Gmür wrote: > > Thanks Stephen, > > > > trying to follow the path you describe I added the following to the > > parent-pom: > > > > > > org.codehaus.mojo > > build-helper-maven-plugin > > > > > > attach-artifacts > > package > > > > attach-artifact > > > > > > > > > > src/assembly/dist.xml > > xml > > > > assembly-descriptor > > > > > > > > > > > > > > > > > > and > > > > org.apache.maven.plugins > > maven-dependency-plugin > > > > > > > > org.wymiwyg.rwcf > > rwcf-apps > > 0.0.1 > > xml > > assembly-descriptor > > false > > > > ${project.build.directory}/src/assembly/ > > > > dist.xml > > > > > > > > > > > > furthermore I changed the descriptor of maven-assembly-plugin to use > > ${project.build.directory}/src/assembly/dist.xml. I didn't change > > anything to the child-projects. > > > > I can now execute "mvn clean dependency:copy assembly:assembly" for > > child projects to create a distribution-package. > > > > The only thing which I'm still insecure is about attaching this to > > phases, the difficulty seems that the super project doesn't need to > > have this attached to any phase, and the dependency resolution fails > > unless executed after install (a solution might be to split the parent > > into a grand-parent providing the assembly descriptor and binding it > > to phases in the intermediate parent). But I'm not sure anyway in > > which phase to best create zip and tar. > > > > Cheers, > > reto > > > > Stephen Connolly wrote: > >> You could attach the common descriptor as a build artifact one > >> module, and > >> then use the dependency plugin to pull it down to each child module. > >> > >> i.e. > >> > >> Use buildhelper-maven-plugin in rwcf-apps to attach dist.xml with a > >> classifier of, e.g. assembly-descriptor. > >> Now when you run mvn install or mvn deploy on rwcf-apps the > >> descriptor will > >> be published to the maven repository (local or remote respectively) > >> > >> Then in one of the modules that you want to use this common > >> descriptor, add > >> a dependency on the rwcf-apps with a type of assembly-descriptor, you > >> use > >> maven-dependency-plugin to copy the dependency to your target > >> directory, and > >> then your pom just directs the assembly plugin to use that descriptor. > >> > >> -Stephen > >> > >> On Thu, Feb 21, 2008 at 8:47 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> > >> wrote: > >> > >> > >>> Hello > >>> > >>> I'm having many projects that share some dependencies and that > >>> should be > >>> packaged the same way. So I wanted to have a parent project configuring > >>> the maven-assembly-plugin. > >>> > >>> I did this with the following in the parent pom: > >>> > >>> > >>> > >>> maven-assembly-plugin > >>> > >>> > >>> > >>> ../rwcf-apps/src/assembly/dist.xml > >>> > >>> > >>> > >>> > >>> This only works when the parent is checked out in a sibling > >>> directory of > >>> the child. If one just check out a child project without checking out > >>> the parent assembly:assembly wont work. Things work using a > >>> descriptorRef but the predefined descriptors don't do what I'm looking > >>> for. > >>> > >>> Possibly ways to solve the issues might be: > >>> > >>> * have the plugin look up the descriptor from the parent rather > >>> * reference a descriptor with an http uri > >>> * include the content of descriptor directly in the pom > >>> > >>> ...but I didn't find a way to do it in any of these ways. > >>> > >>> Any suggestion on how to make it possible to check out a single > >>> child-project and being able to assemble it? > >>> > >>> If you would like to know more precisely what I'm doing, you may > >>> look at > >>> > >>> * The descriptor: > >>> > >>> > https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/src/assembly/dist.xml > >>> > >>> * The parent pom: > >>> > >>> > https://knob
Re: assembly plugin and project inheritance
The version I posted doesn't work as the child-projects can't perform the attach-artifact attached to the package phase. I've now extracted the dist configuration and the attachment of it to a separate project[1]. Having done this I also attached the copy and the assembly goals to the compile and package phases [2]. 1. http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps-assembly/trunk/pom.xml 2. in http://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml Reto Bachmann-Gmür wrote: Thanks Stephen, trying to follow the path you describe I added the following to the parent-pom: org.codehaus.mojo build-helper-maven-plugin attach-artifacts package attach-artifact src/assembly/dist.xml xml assembly-descriptor and org.apache.maven.plugins maven-dependency-plugin org.wymiwyg.rwcf rwcf-apps 0.0.1 xml assembly-descriptor false ${project.build.directory}/src/assembly/ dist.xml furthermore I changed the descriptor of maven-assembly-plugin to use ${project.build.directory}/src/assembly/dist.xml. I didn't change anything to the child-projects. I can now execute "mvn clean dependency:copy assembly:assembly" for child projects to create a distribution-package. The only thing which I'm still insecure is about attaching this to phases, the difficulty seems that the super project doesn't need to have this attached to any phase, and the dependency resolution fails unless executed after install (a solution might be to split the parent into a grand-parent providing the assembly descriptor and binding it to phases in the intermediate parent). But I'm not sure anyway in which phase to best create zip and tar. Cheers, reto Stephen Connolly wrote: You could attach the common descriptor as a build artifact one module, and then use the dependency plugin to pull it down to each child module. i.e. Use buildhelper-maven-plugin in rwcf-apps to attach dist.xml with a classifier of, e.g. assembly-descriptor. Now when you run mvn install or mvn deploy on rwcf-apps the descriptor will be published to the maven repository (local or remote respectively) Then in one of the modules that you want to use this common descriptor, add a dependency on the rwcf-apps with a type of assembly-descriptor, you use maven-dependency-plugin to copy the dependency to your target directory, and then your pom just directs the assembly plugin to use that descriptor. -Stephen On Thu, Feb 21, 2008 at 8:47 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: Hello I'm having many projects that share some dependencies and that should be packaged the same way. So I wanted to have a parent project configuring the maven-assembly-plugin. I did this with the following in the parent pom: maven-assembly-plugin ../rwcf-apps/src/assembly/dist.xml This only works when the parent is checked out in a sibling directory of the child. If one just check out a child project without checking out the parent assembly:assembly wont work. Things work using a descriptorRef but the predefined descriptors don't do what I'm looking for. Possibly ways to solve the issues might be: * have the plugin look up the descriptor from the parent rather * reference a descriptor with an http uri * include the content of descriptor directly in the pom ...but I didn't find a way to do it in any of these ways. Any suggestion on how to make it possible to check out a single child-project and being able to assemble it? If you would like to know more precisely what I'm doing, you may look at * The descriptor: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/src/assembly/dist.xml * The parent pom: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml * A child pom: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-app-webdav/trunk/pom.xml Cheers, reto
Re: assembly plugin and project inheritance
Thanks Stephen, trying to follow the path you describe I added the following to the parent-pom: org.codehaus.mojo build-helper-maven-plugin attach-artifacts package attach-artifact src/assembly/dist.xml xml assembly-descriptor and org.apache.maven.plugins maven-dependency-plugin org.wymiwyg.rwcf rwcf-apps 0.0.1 xml assembly-descriptor false ${project.build.directory}/src/assembly/ dist.xml furthermore I changed the descriptor of maven-assembly-plugin to use ${project.build.directory}/src/assembly/dist.xml. I didn't change anything to the child-projects. I can now execute "mvn clean dependency:copy assembly:assembly" for child projects to create a distribution-package. The only thing which I'm still insecure is about attaching this to phases, the difficulty seems that the super project doesn't need to have this attached to any phase, and the dependency resolution fails unless executed after install (a solution might be to split the parent into a grand-parent providing the assembly descriptor and binding it to phases in the intermediate parent). But I'm not sure anyway in which phase to best create zip and tar. Cheers, reto Stephen Connolly wrote: You could attach the common descriptor as a build artifact one module, and then use the dependency plugin to pull it down to each child module. i.e. Use buildhelper-maven-plugin in rwcf-apps to attach dist.xml with a classifier of, e.g. assembly-descriptor. Now when you run mvn install or mvn deploy on rwcf-apps the descriptor will be published to the maven repository (local or remote respectively) Then in one of the modules that you want to use this common descriptor, add a dependency on the rwcf-apps with a type of assembly-descriptor, you use maven-dependency-plugin to copy the dependency to your target directory, and then your pom just directs the assembly plugin to use that descriptor. -Stephen On Thu, Feb 21, 2008 at 8:47 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: Hello I'm having many projects that share some dependencies and that should be packaged the same way. So I wanted to have a parent project configuring the maven-assembly-plugin. I did this with the following in the parent pom: maven-assembly-plugin ../rwcf-apps/src/assembly/dist.xml This only works when the parent is checked out in a sibling directory of the child. If one just check out a child project without checking out the parent assembly:assembly wont work. Things work using a descriptorRef but the predefined descriptors don't do what I'm looking for. Possibly ways to solve the issues might be: * have the plugin look up the descriptor from the parent rather * reference a descriptor with an http uri * include the content of descriptor directly in the pom ...but I didn't find a way to do it in any of these ways. Any suggestion on how to make it possible to check out a single child-project and being able to assemble it? If you would like to know more precisely what I'm doing, you may look at * The descriptor: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/src/assembly/dist.xml * The parent pom: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml * A child pom: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-app-webdav/trunk/pom.xml Cheers, reto signature.asc Description: OpenPGP digital signature
Re: assembly plugin and project inheritance
You could attach the common descriptor as a build artifact one module, and then use the dependency plugin to pull it down to each child module. i.e. Use buildhelper-maven-plugin in rwcf-apps to attach dist.xml with a classifier of, e.g. assembly-descriptor. Now when you run mvn install or mvn deploy on rwcf-apps the descriptor will be published to the maven repository (local or remote respectively) Then in one of the modules that you want to use this common descriptor, add a dependency on the rwcf-apps with a type of assembly-descriptor, you use maven-dependency-plugin to copy the dependency to your target directory, and then your pom just directs the assembly plugin to use that descriptor. -Stephen On Thu, Feb 21, 2008 at 8:47 PM, Reto Bachmann-Gmür <[EMAIL PROTECTED]> wrote: > Hello > > I'm having many projects that share some dependencies and that should be > packaged the same way. So I wanted to have a parent project configuring > the maven-assembly-plugin. > > I did this with the following in the parent pom: > > > >maven-assembly-plugin > > > > ../rwcf-apps/src/assembly/dist.xml > > > > > This only works when the parent is checked out in a sibling directory of > the child. If one just check out a child project without checking out > the parent assembly:assembly wont work. Things work using a > descriptorRef but the predefined descriptors don't do what I'm looking > for. > > Possibly ways to solve the issues might be: > >* have the plugin look up the descriptor from the parent rather >* reference a descriptor with an http uri >* include the content of descriptor directly in the pom > > ...but I didn't find a way to do it in any of these ways. > > Any suggestion on how to make it possible to check out a single > child-project and being able to assemble it? > > If you would like to know more precisely what I'm doing, you may look at > >* The descriptor: > > https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/src/assembly/dist.xml >* The parent pom: > > https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml >* A child pom: > > https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-app-webdav/trunk/pom.xml > > Cheers, > reto > >
assembly plugin and project inheritance
Hello I'm having many projects that share some dependencies and that should be packaged the same way. So I wanted to have a parent project configuring the maven-assembly-plugin. I did this with the following in the parent pom: maven-assembly-plugin ../rwcf-apps/src/assembly/dist.xml This only works when the parent is checked out in a sibling directory of the child. If one just check out a child project without checking out the parent assembly:assembly wont work. Things work using a descriptorRef but the predefined descriptors don't do what I'm looking for. Possibly ways to solve the issues might be: * have the plugin look up the descriptor from the parent rather * reference a descriptor with an http uri * include the content of descriptor directly in the pom ...but I didn't find a way to do it in any of these ways. Any suggestion on how to make it possible to check out a single child-project and being able to assemble it? If you would like to know more precisely what I'm doing, you may look at * The descriptor: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/src/assembly/dist.xml * The parent pom: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-apps/trunk/pom.xml * A child pom: https://knobot.svn.sourceforge.net/svnroot/knobot/rwcf-app-webdav/trunk/pom.xml Cheers, reto signature.asc Description: OpenPGP digital signature
Re: Project Inheritance reference to parent dependency?
Hi, thank you Jerome for your fast response! I'll check out that plugin. Take care, Kurt Jerome Lacoste schrieb: On 4/10/07, DI Kurt Edegger <[EMAIL PROTECTED]> wrote: Hi, I do have a question regarding referencing the parent pom of a multi module project as described in chapter 3 of "Better Builds With Maven". If a project consists of multiple modules (e.g.: api, core, model, ..), these modules reside in sub-directories of a top level directory. Each module has it's own pom.xml and the top level directory holds a pom.xml where project global settings are defined. Each module's pom sets a reference to the parent, by defining the following snippet: Is there a way to reference the parent module without explicitly specifying the version? In a scenario where all modules are released at the same time, their version should be the same, so the application version is defined in the parent pom.xml. But whenever this version changes, all references in the sub-modules need to be updated. It's cumbersome to manually edit every pom.xml in every sub-directory, just because the application version has changed. Do I miss something here? Yes: http://maven.apache.org/plugins/maven-release-plugin/ The plugin will take care if the POM updates for you. Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- DI Kurt Edegger Austrian Research Centers GmbH - ARC Biomedical Engineering / eHealth systems Reininghausstrasse 13/1 A-8020 Graz, Austria T: +43 (0)316 586570-58 F: +43 (0)316 586570-12 E: [EMAIL PROTECTED] H: www.arcsmed.at/ehs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Project Inheritance reference to parent dependency?
On 4/10/07, DI Kurt Edegger <[EMAIL PROTECTED]> wrote: Hi, I do have a question regarding referencing the parent pom of a multi module project as described in chapter 3 of "Better Builds With Maven". If a project consists of multiple modules (e.g.: api, core, model, ..), these modules reside in sub-directories of a top level directory. Each module has it's own pom.xml and the top level directory holds a pom.xml where project global settings are defined. Each module's pom sets a reference to the parent, by defining the following snippet: Is there a way to reference the parent module without explicitly specifying the version? In a scenario where all modules are released at the same time, their version should be the same, so the application version is defined in the parent pom.xml. But whenever this version changes, all references in the sub-modules need to be updated. It's cumbersome to manually edit every pom.xml in every sub-directory, just because the application version has changed. Do I miss something here? Yes: http://maven.apache.org/plugins/maven-release-plugin/ The plugin will take care if the POM updates for you. Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Project Inheritance reference to parent dependency?
Hi, I do have a question regarding referencing the parent pom of a multi module project as described in chapter 3 of "Better Builds With Maven". If a project consists of multiple modules (e.g.: api, core, model, ..), these modules reside in sub-directories of a top level directory. Each module has it's own pom.xml and the top level directory holds a pom.xml where project global settings are defined. Each module's pom sets a reference to the parent, by defining the following snippet: Is there a way to reference the parent module without explicitly specifying the version? In a scenario where all modules are released at the same time, their version should be the same, so the application version is defined in the parent pom.xml. But whenever this version changes, all references in the sub-modules need to be updated. It's cumbersome to manually edit every pom.xml in every sub-directory, just because the application version has changed. Do I miss something here? Thanks for any comments, Kurt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Project inheritance
By putting the plugins in a pluginManagement section in the parent and then just referencing the groupId:artifactId in the plugin section of the children - Original Message From: Aidan O'Donnell <[EMAIL PROTECTED]> To: users@maven.apache.org Sent: Friday, March 9, 2007 8:52:25 AM Subject: Project inheritance Hi, I have a POM which is both a parent and a multi-module. When I build from this POM I would like the plugins to be executed for the modules and not the parent POM i.e. how can I supress the execution for the current POM but still inherit the properties? Aidan _ Solve the Conspiracy and win fantastic prizes! http://www.theconspiracygame.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Project inheritance
Hi, I have a POM which is both a parent and a multi-module. When I build from this POM I would like the plugins to be executed for the modules and not the parent POM i.e. how can I supress the execution for the current POM but still inherit the properties? Aidan _ Solve the Conspiracy and win fantastic prizes! http://www.theconspiracygame.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WAR Project Inheritance
Hi, A long time ago, this question was posted, but I can't find the answer (if there was one?) My primary goal is to create a WAR (don't need an EAR) that depends on another WAR project...essentially extending that original project. I want to include all the JSPs, etc from the parent WAR. Unfortunately, WAR dependencies don't get copied into the /target. Any ideas on how to extend a WAR project with another WAR project. To get the java classes, I've been making a special assembly with a -jar classified and depending on that...but I don't know how to get the JSPs. I guess I could do the same thing with a -jsp classifier, but there must be a more elegant way. Why can't you depend on a WAR? Arghh... The old reference: http://mail-archives.apache.org/mod_mbox/maven-users/200511.mbox/[EMAIL PROTECTED] -Ben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Project Inheritance problem
Hello all - I'm having a bit of trouble with three layers of pom files. If I have: pom.xml -> pom.xml -> pom.xml what _should_ the parent tags look like? In the top most one, I have: lty app 1.0-SNAPSHOT pom In the middle one, I have: lty app 1.0-SNAPSHOT lty frontoffice 1.0-SNAPSHOT and at the lowest level, I have: lty frontoffice 1.0-SNAPSHOT memberApp war 1.0-SNAPSHOT At the top level, I have this defined: maven-surefire-plugin ../reportsdirectory **/JTAManagedTransactionContextTest.java common.properties ${work.dir}/common.properties uprweb.properties ${work.dir}/uprweb.properties java.util.logging.config.file ${work.dir}/utils/src/main/conf/logging.properties But when I run, the tests in the lowest level don't get the systemProperties for some reason (I can clearly see they aren't getting passed along). How can I fix this?
Re: mvn eclipse:plugin and project inheritance
yes, that is the way it is currently set up On 5/17/06, Taavi Sildeberg <[EMAIL PROTECTED]> wrote: Hello David, Do you have inside a module A and s module B parent defined? Something like this: your parent groupid your parent artifact id your parent version Taavi Davis Ford wrote: > Hi, I have a parent pom.xml project in C:\someplace\pom.xml that has > > moduleA > moduleB > > Then I have > > C:\someplace\moduleA\pom.xml > C:\someplace\moduleB\pom.xml > > If I execute: > > C:\someplace\>mvn clean > C:\someplace\>mvn compile > C:\someplace\>mvn test > > That works great for moduleA, moduleB > > If I execute: > > C:\someplace\moduleA\mvn eclipse:eclipse > C:\someplace\moduleB\mvn eclipse:eclipse > > That works great to create eclipse projects for moduleA, moduleB > > If I execute: > > C:\someplace\mvn eclipse:eclipse > > This causes a problem. If I refresh moduleA, moduleB projects in > eclipse after doing so, they complain about not finding the other > subprojects. > > What is the best-practice here? Is there a workaround for this? > > Thanks in advance, > Davis > > - > 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] -- Zeno Consulting, Inc. (248) 894-4922 (p) (206) 202-4077 (f) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mvn eclipse:plugin and project inheritance
Hello David, Do you have inside a module A and s module B parent defined? Something like this: your parent groupid your parent artifact id your parent version Taavi Davis Ford wrote: Hi, I have a parent pom.xml project in C:\someplace\pom.xml that has moduleA moduleB Then I have C:\someplace\moduleA\pom.xml C:\someplace\moduleB\pom.xml If I execute: C:\someplace\>mvn clean C:\someplace\>mvn compile C:\someplace\>mvn test That works great for moduleA, moduleB If I execute: C:\someplace\moduleA\mvn eclipse:eclipse C:\someplace\moduleB\mvn eclipse:eclipse That works great to create eclipse projects for moduleA, moduleB If I execute: C:\someplace\mvn eclipse:eclipse This causes a problem. If I refresh moduleA, moduleB projects in eclipse after doing so, they complain about not finding the other subprojects. What is the best-practice here? Is there a workaround for this? Thanks in advance, Davis - 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]
mvn eclipse:plugin and project inheritance
Hi, I have a parent pom.xml project in C:\someplace\pom.xml that has moduleA moduleB Then I have C:\someplace\moduleA\pom.xml C:\someplace\moduleB\pom.xml If I execute: C:\someplace\>mvn clean C:\someplace\>mvn compile C:\someplace\>mvn test That works great for moduleA, moduleB If I execute: C:\someplace\moduleA\mvn eclipse:eclipse C:\someplace\moduleB\mvn eclipse:eclipse That works great to create eclipse projects for moduleA, moduleB If I execute: C:\someplace\mvn eclipse:eclipse This causes a problem. If I refresh moduleA, moduleB projects in eclipse after doing so, they complain about not finding the other subprojects. What is the best-practice here? Is there a workaround for this? Thanks in advance, Davis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]