jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-5241

Repositories declared in parent pom are not used in children modules

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 3.0.3, 3.0.4
  • Fix Version/s: None
  • Component/s: Artifacts and Repositories
  • Labels:
    None
  • Environment:
    Windows
  • Complexity:
    Intermediate

Description

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

In my super pom, i have declared many repositories :

<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>

Then i have a module with a parent pom which inherits from "main-itcb". My module is called "itcb-common-root".

<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>

This module declares children modules which sources are integrated in subdirectories.

<modules>
		<module>common-business</module>
		<module>common-business-impl</module>
		<module>common-server</module>
		<module>common-client</module>
		<module>common-portlet</module>
	</modules>

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
  • Whereas with Maven 3.0.3, it is not using repositories i defined. It always tries to download artifacts from Maven central.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Pierre Le Roux added a comment - 09/Feb/12 5:10 PM

i forgot to put parent declarations in submodules pom :

<parent>
    <artifactId>itcb-common-root</artifactId>
    <groupId>net.sf.itcb.common</groupId>
    <version>0.6.0-RC7-SNAPSHOT</version>
  </parent>
  <groupId>net.sf.itcb.common</groupId>
  <artifactId>itcb-common-business</artifactId>
Show
Pierre Le Roux added a comment - 09/Feb/12 5:10 PM i forgot to put parent declarations in submodules pom :
<parent>
    <artifactId>itcb-common-root</artifactId>
    <groupId>net.sf.itcb.common</groupId>
    <version>0.6.0-RC7-SNAPSHOT</version>
  </parent>
  <groupId>net.sf.itcb.common</groupId>
  <artifactId>itcb-common-business</artifactId>

People

  • Assignee:
    Unassigned
    Reporter:
    Pierre Le Roux
Vote (0)
Watch (1)

Dates

  • Created:
    09/Feb/12 4:58 PM
    Updated:
    09/Feb/12 5:10 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.