You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Richard van der Hoff (JIRA)" <ji...@codehaus.org> on 2006/10/19 16:03:20 UTC

[jira] Created: (MNG-2619) building from the middle pom of a (parent,child,grandchild) heirarchy fails

building from the middle pom of a (parent,child,grandchild) heirarchy fails
---------------------------------------------------------------------------

                 Key: MNG-2619
                 URL: http://jira.codehaus.org/browse/MNG-2619
             Project: Maven 2
          Issue Type: Bug
          Components: POM
    Affects Versions: 2.0.4, 2.0.5, 2.1
            Reporter: Richard van der Hoff
         Attachments: maven-project-middlepom.patch

Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:

Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of {artifact,group,version}.

The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).

This is much easier demonstrated than explained :/

The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2619) building from the middle pom of a (parent,child,grandchild) heirarchy fails

Posted by "Ryan Hoegg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_86309 ] 

Ryan Hoegg commented on MNG-2619:
---------------------------------

I'd like to add that I've experienced this myself.  I didn't think a module was required, but from the description it might be after all.  If so, then building the child directly should work fine.

> building from the middle pom of a (parent,child,grandchild) heirarchy fails
> ---------------------------------------------------------------------------
>
>                 Key: MNG-2619
>                 URL: http://jira.codehaus.org/browse/MNG-2619
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.4, 2.0.5, 2.1
>            Reporter: Richard van der Hoff
>         Attachments: maven-project-middlepom.patch
>
>
> Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:
> Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of {artifact,group,version}.
> The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).
> This is much easier demonstrated than explained :/
> The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2619) building from the middle pom of a (parent,child,grandchild) heirarchy fails

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey updated MNG-2619:
----------------------------

    Patch Submitted: [Yes]

> building from the middle pom of a (parent,child,grandchild) heirarchy fails
> ---------------------------------------------------------------------------
>
>                 Key: MNG-2619
>                 URL: http://jira.codehaus.org/browse/MNG-2619
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0-alpha-1, 2.0.4, 2.0.5
>            Reporter: Richard van der Hoff
>            Assignee: John Casey
>         Attachments: maven-project-middlepom.patch
>
>
> Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:
> Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of {artifact,group,version}.
> The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).
> This is much easier demonstrated than explained :/
> The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-2619) building from the middle pom of a (parent,child,grandchild) heirarchy fails

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed MNG-2619.
---------------------------

    Resolution: Fixed

> building from the middle pom of a (parent,child,grandchild) heirarchy fails
> ---------------------------------------------------------------------------
>
>                 Key: MNG-2619
>                 URL: http://jira.codehaus.org/browse/MNG-2619
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0-alpha-1, 2.0.4, 2.0.5
>            Reporter: Richard van der Hoff
>            Assignee: John Casey
>         Attachments: maven-project-middlepom.patch
>
>
> Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:
> Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of {artifact,group,version}.
> The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).
> This is much easier demonstrated than explained :/
> The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2619) building from the middle pom of a (parent,child,grandchild) heirarchy fails

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey updated MNG-2619:
----------------------------

           Assignee: John Casey
    Patch Submitted:   (was: [Yes])

> building from the middle pom of a (parent,child,grandchild) heirarchy fails
> ---------------------------------------------------------------------------
>
>                 Key: MNG-2619
>                 URL: http://jira.codehaus.org/browse/MNG-2619
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0-alpha-1, 2.0.4, 2.0.5
>            Reporter: Richard van der Hoff
>            Assignee: John Casey
>         Attachments: maven-project-middlepom.patch
>
>
> Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:
> Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of {artifact,group,version}.
> The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).
> This is much easier demonstrated than explained :/
> The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-2619) building from the middle pom of a (parent,child,grandchild) heirarchy fails

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-2619:
------------------------------

    Fix Version/s: 3.0-alpha-1

> building from the middle pom of a (parent,child,grandchild) heirarchy fails
> ---------------------------------------------------------------------------
>
>                 Key: MNG-2619
>                 URL: http://jira.codehaus.org/browse/MNG-2619
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0-alpha-1, 2.0.4, 2.0.5
>            Reporter: Richard van der Hoff
>            Assignee: John Casey
>             Fix For: 3.0-alpha-1
>
>         Attachments: maven-project-middlepom.patch
>
>
> Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:
> Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of {artifact,group,version}.
> The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).
> This is much easier demonstrated than explained :/
> The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-2619) building from the middle pom of a (parent,child,grandchild) heirarchy fails

Posted by "Barrett Nuzum (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_89549 ] 

Barrett Nuzum commented on MNG-2619:
------------------------------------

Seems to be related to repository metadata --
if the parent has been deployed rather than installed, it is more easily found.

> building from the middle pom of a (parent,child,grandchild) heirarchy fails
> ---------------------------------------------------------------------------
>
>                 Key: MNG-2619
>                 URL: http://jira.codehaus.org/browse/MNG-2619
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 2.0.4, 2.0.5, 2.1
>            Reporter: Richard van der Hoff
>         Attachments: maven-project-middlepom.patch
>
>
> Given a heirerchy of projects - parent, child, grandchild - with <parent> and <module> links between them in the normal way:
> Attempting to start a build from the middle of the heirarchy - ie, the "child" - causes maven to attempt to download the parent from the repository - even if the version in the filesystem is correct in terms of {artifact,group,version}.
> The problem appears to be that the ProjectBuilder first reads the child pom, and caches the result (but not the parent pom). The reactor then makes the ProjectBuilder read the grandchild pom, and hence the child pom (which now comes from the cache), and the parent pom (which it can't find).
> This is much easier demonstrated than explained :/
> The attached patch fixes the problem by making sure that all the projects in the heirarchy (including the parent) are added to the cache. It also includes a test case to demonstrate the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira