Re: multimodule building
What's wrong with Wayne's first suggestion? module1 *depends* on module3, so you *must* build module3 at some point in time: cd module3 mvn install However now this module is built and the jar placed somewhere that module1 can find it (under $HOME/.m2/ as it happens). You can therefore build module1 repeatedly without rebuilding module3: cd module1 mvn package .. hack code .. mvn package .. hack code .. mvn package As for a maven commandline switch to build just one module of a parent pom, maybe --reactor does this? I'm not sure as the description of this option is rather vague but the reactor is a list of the projects to be built, ie the set of modules defined, so a project found in the reactor might be what you are looking for.. Regards, Simon On Fri, 2006-03-17 at 21:40 -0800, Pierre Monestie wrote: Wayne, The second way you describe is the way my project is defined. Assume I have a couple extra modules defined this way and I only want to build module1. If I issue mvn package all the modules will be build correct? My question is: Is there a command line switch to tell mvn to build only module1 (and it's dependencies). I know I could put an ignore clause(or something like that) in the top level file but that's not really what I want. Thanks, Pierre On 3/17/06, Wayne Fay [EMAIL PROTECTED] wrote: A few ways to do this... Assume you're starting from parent directory... cd module3 mvn install cd .. cd module1 mvn package This will result in module1 being built and the resulting jar placed in module1/target. OR Add to parent/pom.xml: modules modulemodule3/module modulemodule2/module modulemodule1/module /modules Then make sure you have in module1/pom.xml: ?xml version=1.0 encoding=iso-8859-1? project parent groupIdblah/groupId artifactIdparent/artifactId version1.0.0/version /parent modelVersion4.0.0/modelVersion groupIdblah/groupId artifactIdmodule1/artifactId packagingjar/packaging version1.0.0/version dependencies dependency groupIdblah/groupId artifactIdmodule3/artifactId version1.0.0/version scopecompile/scope typejar/type /dependency And then issue a simple mvn package command from parent directory. This will also place the resulting jar in the module1/target directory. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Hello, I've been looking all over for this and could not find any answer: In a multi module project how can I, from the parent level, build a specific module? Going into the child I want to build does not work as it refers to a parent. For example I have: parent --module1 (depends on module3) --module2 --module3 and I just want to build module1. Tell me this is possible plz :) Thanks in advance, Pierre - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multimodule building
I am trying to write some documentations right now. Lack of documentation has always been the worst enemy of Maven, people are a bit afraid of it I think. I am mainly writing a tutorial because I don't like the sparse guide model right now. It isn't very user friendly. People are like ok wich one should I read first? or ok I see but what is has to do with all the other sutff. I am trying to go a trail-oriented way. See http://docs.codehaus.org/display/MAVENUSER/The+Maven+2+tutorial It is still in early stages but I will try to work on it a lot in the coming week. Any comments and suggestions are welcome! After that it will be up to the Maven team to decide if they want to publish it. On 3/18/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, What I don't understand, compared to writing really useful information on the mailing list, how more difficult is it to keep the guides and FAQs on the page in shape? IMHO, if we could streamline the process of updating the guides and FAW (wiki like), the documentation could be improved a lot. But I guess the guides are in apt format, checked in in cvs, right? Anyway, this is something that should be put into the multimodule-guide, which does not exist yet. _ ___ _ //\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com `-` Andreas Ebbert-Karroum Software Design Engineer - Nokia Networks Services / Middleware phone: +49-211-94123928, fax: +49-211-9412-3838 Heltorfer Straße 1, 40472 Düsseldorf, Germany -- This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you. Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/ -- -Original Message- From: ext Wayne Fay [mailto:[EMAIL PROTECTED] Sent: 18 March, 2006 06:18 To: Maven Users List Subject: Re: multimodule building A few ways to do this... Assume you're starting from parent directory... cd module3 mvn install cd .. cd module1 mvn package This will result in module1 being built and the resulting jar placed in module1/target. OR Add to parent/pom.xml: modules modulemodule3/module modulemodule2/module modulemodule1/module /modules Then make sure you have in module1/pom.xml: ?xml version=1.0 encoding=iso-8859-1? project parent groupIdblah/groupId artifactIdparent/artifactId version1.0.0/version /parent modelVersion4.0.0/modelVersion groupIdblah/groupId artifactIdmodule1/artifactId packagingjar/packaging version1.0.0/version dependencies dependency groupIdblah/groupId artifactIdmodule3/artifactId version1.0.0/version scopecompile/scope typejar/type /dependency And then issue a simple mvn package command from parent directory. This will also place the resulting jar in the module1/target directory. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Hello, I've been looking all over for this and could not find any answer: In a multi module project how can I, from the parent level, build a specific module? Going into the child I want to build does not work as it refers to a parent. For example I have: parent --module1 (depends on module3) --module2 --module3 and I just want to build module1. Tell me this is possible plz :) Thanks in advance, Pierre - 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] -- Alexandre Poitras Québec, Canada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multimodule building
By the way, english isn't my native language so don't be to hard on my writing please :) Just kidding. Seriously, any orthographic corrections are very welcome. On 3/18/06, Alexandre Poitras [EMAIL PROTECTED] wrote: I am trying to write some documentations right now. Lack of documentation has always been the worst enemy of Maven, people are a bit afraid of it I think. I am mainly writing a tutorial because I don't like the sparse guide model right now. It isn't very user friendly. People are like ok wich one should I read first? or ok I see but what is has to do with all the other sutff. I am trying to go a trail-oriented way. See http://docs.codehaus.org/display/MAVENUSER/The+Maven+2+tutorial It is still in early stages but I will try to work on it a lot in the coming week. Any comments and suggestions are welcome! After that it will be up to the Maven team to decide if they want to publish it. On 3/18/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, What I don't understand, compared to writing really useful information on the mailing list, how more difficult is it to keep the guides and FAQs on the page in shape? IMHO, if we could streamline the process of updating the guides and FAW (wiki like), the documentation could be improved a lot. But I guess the guides are in apt format, checked in in cvs, right? Anyway, this is something that should be put into the multimodule-guide, which does not exist yet. _ ___ _ //\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com `-` Andreas Ebbert-Karroum Software Design Engineer - Nokia Networks Services / Middleware phone: +49-211-94123928, fax: +49-211-9412-3838 Heltorfer Straße 1, 40472 Düsseldorf, Germany -- This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you. Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/ -- -Original Message- From: ext Wayne Fay [mailto:[EMAIL PROTECTED] Sent: 18 March, 2006 06:18 To: Maven Users List Subject: Re: multimodule building A few ways to do this... Assume you're starting from parent directory... cd module3 mvn install cd .. cd module1 mvn package This will result in module1 being built and the resulting jar placed in module1/target. OR Add to parent/pom.xml: modules modulemodule3/module modulemodule2/module modulemodule1/module /modules Then make sure you have in module1/pom.xml: ?xml version=1.0 encoding=iso-8859-1? project parent groupIdblah/groupId artifactIdparent/artifactId version1.0.0/version /parent modelVersion4.0.0/modelVersion groupIdblah/groupId artifactIdmodule1/artifactId packagingjar/packaging version1.0.0/version dependencies dependency groupIdblah/groupId artifactIdmodule3/artifactId version1.0.0/version scopecompile/scope typejar/type /dependency And then issue a simple mvn package command from parent directory. This will also place the resulting jar in the module1/target directory. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Hello, I've been looking all over for this and could not find any answer: In a multi module project how can I, from the parent level, build a specific module? Going into the child I want to build does not work as it refers to a parent. For example I have: parent --module1 (depends on module3) --module2 --module3 and I just want to build module1. Tell me this is possible plz :) Thanks in advance, Pierre - 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] -- Alexandre Poitras Québec, Canada -- Alexandre Poitras Québec, Canada - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multimodule building
A few ways to do this... Assume you're starting from parent directory... cd module3 mvn install cd .. cd module1 mvn package This will result in module1 being built and the resulting jar placed in module1/target. OR Add to parent/pom.xml: modules modulemodule3/module modulemodule2/module modulemodule1/module /modules Then make sure you have in module1/pom.xml: ?xml version=1.0 encoding=iso-8859-1? project parent groupIdblah/groupId artifactIdparent/artifactId version1.0.0/version /parent modelVersion4.0.0/modelVersion groupIdblah/groupId artifactIdmodule1/artifactId packagingjar/packaging version1.0.0/version dependencies dependency groupIdblah/groupId artifactIdmodule3/artifactId version1.0.0/version scopecompile/scope typejar/type /dependency And then issue a simple mvn package command from parent directory. This will also place the resulting jar in the module1/target directory. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Hello, I've been looking all over for this and could not find any answer: In a multi module project how can I, from the parent level, build a specific module? Going into the child I want to build does not work as it refers to a parent. For example I have: parent --module1 (depends on module3) --module2 --module3 and I just want to build module1. Tell me this is possible plz :) Thanks in advance, Pierre - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multimodule building
Wayne, The second way you describe is the way my project is defined. Assume I have a couple extra modules defined this way and I only want to build module1. If I issue mvn package all the modules will be build correct? My question is: Is there a command line switch to tell mvn to build only module1 (and it's dependencies). I know I could put an ignore clause(or something like that) in the top level file but that's not really what I want. Thanks, Pierre On 3/17/06, Wayne Fay [EMAIL PROTECTED] wrote: A few ways to do this... Assume you're starting from parent directory... cd module3 mvn install cd .. cd module1 mvn package This will result in module1 being built and the resulting jar placed in module1/target. OR Add to parent/pom.xml: modules modulemodule3/module modulemodule2/module modulemodule1/module /modules Then make sure you have in module1/pom.xml: ?xml version=1.0 encoding=iso-8859-1? project parent groupIdblah/groupId artifactIdparent/artifactId version1.0.0/version /parent modelVersion4.0.0/modelVersion groupIdblah/groupId artifactIdmodule1/artifactId packagingjar/packaging version1.0.0/version dependencies dependency groupIdblah/groupId artifactIdmodule3/artifactId version1.0.0/version scopecompile/scope typejar/type /dependency And then issue a simple mvn package command from parent directory. This will also place the resulting jar in the module1/target directory. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Hello, I've been looking all over for this and could not find any answer: In a multi module project how can I, from the parent level, build a specific module? Going into the child I want to build does not work as it refers to a parent. For example I have: parent --module1 (depends on module3) --module2 --module3 and I just want to build module1. Tell me this is possible plz :) Thanks in advance, Pierre - 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]
Re: multimodule building
I personally have never had any desire to perform a partial build as you desire. So I have no idea if it is possible and how it would be configured. ;-) If you figure it out, please do let the rest of us know. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Wayne, The second way you describe is the way my project is defined. Assume I have a couple extra modules defined this way and I only want to build module1. If I issue mvn package all the modules will be build correct? My question is: Is there a command line switch to tell mvn to build only module1 (and it's dependencies). I know I could put an ignore clause(or something like that) in the top level file but that's not really what I want. Thanks, Pierre On 3/17/06, Wayne Fay [EMAIL PROTECTED] wrote: A few ways to do this... Assume you're starting from parent directory... cd module3 mvn install cd .. cd module1 mvn package This will result in module1 being built and the resulting jar placed in module1/target. OR Add to parent/pom.xml: modules modulemodule3/module modulemodule2/module modulemodule1/module /modules Then make sure you have in module1/pom.xml: ?xml version=1.0 encoding=iso-8859-1? project parent groupIdblah/groupId artifactIdparent/artifactId version1.0.0/version /parent modelVersion4.0.0/modelVersion groupIdblah/groupId artifactIdmodule1/artifactId packagingjar/packaging version1.0.0/version dependencies dependency groupIdblah/groupId artifactIdmodule3/artifactId version1.0.0/version scopecompile/scope typejar/type /dependency And then issue a simple mvn package command from parent directory. This will also place the resulting jar in the module1/target directory. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Hello, I've been looking all over for this and could not find any answer: In a multi module project how can I, from the parent level, build a specific module? Going into the child I want to build does not work as it refers to a parent. For example I have: parent --module1 (depends on module3) --module2 --module3 and I just want to build module1. Tell me this is possible plz :) Thanks in advance, Pierre - 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]
RE: multimodule building
Hi, What I don't understand, compared to writing really useful information on the mailing list, how more difficult is it to keep the guides and FAQs on the page in shape? IMHO, if we could streamline the process of updating the guides and FAW (wiki like), the documentation could be improved a lot. But I guess the guides are in apt format, checked in in cvs, right? Anyway, this is something that should be put into the multimodule-guide, which does not exist yet. _ ___ _ //\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com `-` Andreas Ebbert-Karroum Software Design Engineer - Nokia Networks Services / Middleware phone: +49-211-94123928, fax: +49-211-9412-3838 Heltorfer Straße 1, 40472 Düsseldorf, Germany -- This message is confidential. If you have received this message in error, please delete it from your system. You should not copy it for any purpose, or disclose its contents to any other person. Internet communications are not secure and therefore Nokia GmbH does not accept legal responsibility for the contents of this message as it has been transmitted over a public network. Thank you. Nokia GmbH, Nokia Networks is a German Company. Further information about the Company is available from its principal offices at Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the website at http://www.nokia.com/ -- -Original Message- From: ext Wayne Fay [mailto:[EMAIL PROTECTED] Sent: 18 March, 2006 06:18 To: Maven Users List Subject: Re: multimodule building A few ways to do this... Assume you're starting from parent directory... cd module3 mvn install cd .. cd module1 mvn package This will result in module1 being built and the resulting jar placed in module1/target. OR Add to parent/pom.xml: modules modulemodule3/module modulemodule2/module modulemodule1/module /modules Then make sure you have in module1/pom.xml: ?xml version=1.0 encoding=iso-8859-1? project parent groupIdblah/groupId artifactIdparent/artifactId version1.0.0/version /parent modelVersion4.0.0/modelVersion groupIdblah/groupId artifactIdmodule1/artifactId packagingjar/packaging version1.0.0/version dependencies dependency groupIdblah/groupId artifactIdmodule3/artifactId version1.0.0/version scopecompile/scope typejar/type /dependency And then issue a simple mvn package command from parent directory. This will also place the resulting jar in the module1/target directory. Wayne On 3/17/06, Pierre Monestie [EMAIL PROTECTED] wrote: Hello, I've been looking all over for this and could not find any answer: In a multi module project how can I, from the parent level, build a specific module? Going into the child I want to build does not work as it refers to a parent. For example I have: parent --module1 (depends on module3) --module2 --module3 and I just want to build module1. Tell me this is possible plz :) Thanks in advance, Pierre - 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]