Pierre Le Roux created MNG-5241:
-----------------------------------

             Summary: Repositories declared in parent pom are not used in 
children modules
                 Key: MNG-5241
                 URL: https://jira.codehaus.org/browse/MNG-5241
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 3.0.4, 3.0.3
         Environment: Windows
            Reporter: Pierre Le Roux


I have a super pom named "main-itcb".

In my super pom, i have declared many repositories :
{code:xml}
<repositories>
                <repository>
                        <id>sonatype</id>
                        <url>http://oss.sonatype.org/content/groups/public</url>
                </repository>
                        
                <repository>
                        <id>jboss</id>
                        
<url>https://repository.jboss.org/nexus/content/groups/public</url>
                </repository>
                
                <repository>
                        <id>repo-ext_spring</id>
                        
<url>https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext</url>
                </repository>
                
                <repository>
                        <id>milestone_spring</id>
                        <url>http://maven.springframework.org/milestone/</url>
                </repository>
                
        
        </repositories>
{code}

Then i have a module with a parent pom which inherits from "main-itcb". My 
module is called "itcb-common-root".
{code:xml}
        <parent>
                <artifactId>main-itcb</artifactId>
                <groupId>net.sf.itcb.common</groupId>
                <version>1.5.0-RC2-SNAPSHOT</version>
        </parent>

        <groupId>net.sf.itcb.common</groupId>
        <artifactId>itcb-common-root</artifactId>
        <version>0.6.0-RC7-SNAPSHOT</version>
        <packaging>pom</packaging>
{code}

This module declares children modules which sources are integrated in 
subdirectories.
 {code:xml}
        <modules>
                <module>common-business</module>
                <module>common-business-impl</module>
                <module>common-server</module>
                <module>common-client</module>
                <module>common-portlet</module>
        </modules>
 {code}

With *Maven 2.2.1* or with *Maven 3.0.3", i run "maven install" on "main-itcb", 
then "itcb-common-root".
When main-itcb is compiling, it is using all repositories i defined, in order 
to retrieve dependencies.
When itcb-common-root is compiling, it is using all repositories in order to 
retrieve dependencies.
==> For now : no problem

After having compiled itcb-common-root, Maven automatically launches the 
submodules build.
Here is the problem :
* With *Maven 2.2.1*, it is using the reprositories i defined
* {color:red} Whereas with *Maven 3.0.3*, it is not using repositories i 
defined. It always tries to download artifacts from Maven central.{color} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to