You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by xiubinzheng <xi...@gmail.com> on 2012/03/05 22:42:51 UTC

Master pom file to checkout all modules of a project

Hi fellow developers,

I have a web application that relies on several modules. So to build it, I
have a master pom.xml file. What I want this pom file to do is to checkout
out all the modules. 
below is my pom file. 

<scm>
			<configuration>   
			 <connection>scm:svn:svn:///svn/module1/trunk</connection>
			<tag>HEAD</tag>
			</configuration>   
</scm>

The above code will only checkout just one project, I spends days and cannot
get it to checkout multiple projects. Please help if anyone knows how I
could checkout multiple projects using one pom.xml file. Thanks. 

--
View this message in context: http://maven.40175.n5.nabble.com/Master-pom-file-to-checkout-all-modules-of-a-project-tp5539024p5539024.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Master pom file to checkout all modules of a project

Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Mar 6, 2012 at 2:32 PM, Karl Heinz Marbaise <kh...@gmx.de> wrote:
[del]
> That sounds like a misuse/misunderstanding of Maven...
[del]
> Kind regards
> Karl Heinz Marbaise

Good advice Karl,
I normally also include the links to the freely available books at
http://maven.apache.org/articles.html

xiubinzheng, you should read those documents, you will save yourself
countless hours.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Master pom file to checkout all modules of a project

Posted by Karl Heinz Marbaise <kh...@gmx.de>.
Hi,
> Hi fellow developers,
>
> I have a web application that relies on several modules. So to build it, I
> have a master pom.xml file. What I want this pom file to do is to checkout
> out all the modules.
> below is my pom file.
>
> <scm>
> 			<configuration>
> 			<connection>scm:svn:svn:///svn/module1/trunk</connection>
> 			<tag>HEAD</tag>
> 			</configuration>
> </scm>
>
> The above code will only checkout just one project, I spends days and cannot
> get it to checkout multiple projects. Please help if anyone knows how I
> could checkout multiple projects using one pom.xml file. Thanks.
That sounds like a misuse/misunderstanding of Maven...

If you have a web application which relies on several modules the best 
way to handle this is to use a multi-module build:

+-- root
      +--- web (war; depends on lib1 and lib2)
      +--- lib1
      +--- lib2

so you have to checkout only the root directory which contains 
everything you need...

If you have only dependencies which are needed than you should solve it 
by using dependencies in your pom of your web-app project:

<dependencies>
    <dependency>
      <groupId>...</groupId>
      <artifactId>lib1</artifactId>
      <version>1.0.0</version>
   </dependency>
   ...
<dependencies>

This will result in a build which will get the dependencies out of your 
maven repository. This means in other words you need to install/release 
the lib1 artifact before you can build/release your web-app...

If you try to work with a continous integration solution like 
Jenkins/Hudson you can configure in Jenkins/Hudson to checkout from 
serveral URL's in SVN so you don't need to try that via Maven...

Kind regards
Karl Heinz Marbaise
-- 
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl Heinz Marbaise        ICQ#: 135949029
Hauptstrasse 177                         USt.IdNr: DE191347579
52146 Würselen                           http://www.soebes.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org