You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Allen (JIRA)" <ji...@codehaus.org> on 2007/02/04 12:27:44 UTC

[jira] Created: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

populateModulesMenu() logic results in invalid modules list if projects share artifactIds
-----------------------------------------------------------------------------------------

                 Key: MSITE-209
                 URL: http://jira.codehaus.org/browse/MSITE-209
             Project: Maven 2.x Site Plugin
          Issue Type: Bug
    Affects Versions: 2.0-beta-5, 2.0
            Reporter: John Allen
            Priority: Critical


populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....

    private void populateModulesMenuItemsFromReactorProjects( Menu menu )
    {

[SNIP]

                if ( reactorProject != null && reactorProject.getParent() != null &&
                    project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
                {
                    String reactorUrl = reactorProject.getUrl();
                    String name = reactorProject.getName();

                    appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
                }
            }
        }
    }

Comparison should also check that the groupId of the reactorProject's parent matches our groupId.

Clear?.. Sorry, the patch on my laptop too... 



-- 
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: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

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

John Allen updated MSITE-209:
-----------------------------

    Attachment: site-patch.diff

patch attached

> populateModulesMenu() logic results in invalid modules list if projects share artifactIds
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-209
>                 URL: http://jira.codehaus.org/browse/MSITE-209
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-5, 2.0
>            Reporter: John Allen
>            Priority: Critical
>         Attachments: site-patch.diff
>
>
> populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....
>     private void populateModulesMenuItemsFromReactorProjects( Menu menu )
>     {
> [SNIP]
>                 if ( reactorProject != null && reactorProject.getParent() != null &&
>                     project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
>                 {
>                     String reactorUrl = reactorProject.getUrl();
>                     String name = reactorProject.getName();
>                     appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
>                 }
>             }
>         }
>     }
> Comparison should also check that the groupId of the reactorProject's parent matches our groupId.
> Clear?.. Sorry, the patch on my laptop too... 

-- 
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: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg closed MSITE-209.
---------------------------------

    Resolution: Duplicate

> populateModulesMenu() logic results in invalid modules list if projects share artifactIds
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-209
>                 URL: http://jira.codehaus.org/browse/MSITE-209
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: multi module
>    Affects Versions: 2.0-beta-5, 2.0-beta-6
>            Reporter: John Allen
>            Priority: Critical
>         Attachments: site-patch.diff, site-patch.diff
>
>
> populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....
>     private void populateModulesMenuItemsFromReactorProjects( Menu menu )
>     {
> [SNIP]
>                 if ( reactorProject != null && reactorProject.getParent() != null &&
>                     project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
>                 {
>                     String reactorUrl = reactorProject.getUrl();
>                     String name = reactorProject.getName();
>                     appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
>                 }
>             }
>         }
>     }
> Comparison should also check that the groupId of the reactorProject's parent matches our groupId.
> Clear?.. Sorry, the patch on my laptop too... 

-- 
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: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

Posted by "John Allen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106281 ] 

John Allen commented on MSITE-209:
----------------------------------

Crazy busy at the moment but yes of course (will take some time though sorry). The logic above is fairly self-evident though. Namely increase the name matching resolution to include an artefacts groupId as well as artifactId. 

> populateModulesMenu() logic results in invalid modules list if projects share artifactIds
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-209
>                 URL: http://jira.codehaus.org/browse/MSITE-209
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: multi module
>    Affects Versions: 2.0-beta-5, 2.0-beta-6
>            Reporter: John Allen
>            Priority: Critical
>         Attachments: site-patch.diff, site-patch.diff
>
>
> populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....
>     private void populateModulesMenuItemsFromReactorProjects( Menu menu )
>     {
> [SNIP]
>                 if ( reactorProject != null && reactorProject.getParent() != null &&
>                     project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
>                 {
>                     String reactorUrl = reactorProject.getUrl();
>                     String name = reactorProject.getName();
>                     appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
>                 }
>             }
>         }
>     }
> Comparison should also check that the groupId of the reactorProject's parent matches our groupId.
> Clear?.. Sorry, the patch on my laptop too... 

-- 
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: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

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

John Allen updated MSITE-209:
-----------------------------

    Attachment: site-patch.diff

updated patch against latest trunk, would someone please apply as its been an age

> populateModulesMenu() logic results in invalid modules list if projects share artifactIds
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-209
>                 URL: http://jira.codehaus.org/browse/MSITE-209
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-5, 2.0-beta-6
>            Reporter: John Allen
>            Priority: Critical
>         Attachments: site-patch.diff, site-patch.diff
>
>
> populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....
>     private void populateModulesMenuItemsFromReactorProjects( Menu menu )
>     {
> [SNIP]
>                 if ( reactorProject != null && reactorProject.getParent() != null &&
>                     project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
>                 {
>                     String reactorUrl = reactorProject.getUrl();
>                     String name = reactorProject.getName();
>                     appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
>                 }
>             }
>         }
>     }
> Comparison should also check that the groupId of the reactorProject's parent matches our groupId.
> Clear?.. Sorry, the patch on my laptop too... 

-- 
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: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106179 ] 

Dennis Lundberg commented on MSITE-209:
---------------------------------------

John, do you think that you could supply a small project hierarchy that exhibits this issue. It'd help me test your patch.

> populateModulesMenu() logic results in invalid modules list if projects share artifactIds
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-209
>                 URL: http://jira.codehaus.org/browse/MSITE-209
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-beta-5, 2.0-beta-6
>            Reporter: John Allen
>            Priority: Critical
>         Attachments: site-patch.diff, site-patch.diff
>
>
> populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....
>     private void populateModulesMenuItemsFromReactorProjects( Menu menu )
>     {
> [SNIP]
>                 if ( reactorProject != null && reactorProject.getParent() != null &&
>                     project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
>                 {
>                     String reactorUrl = reactorProject.getUrl();
>                     String name = reactorProject.getName();
>                     appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
>                 }
>             }
>         }
>     }
> Comparison should also check that the groupId of the reactorProject's parent matches our groupId.
> Clear?.. Sorry, the patch on my laptop too... 

-- 
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: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MSITE-209:
----------------------------------

    Component/s: multi module

> populateModulesMenu() logic results in invalid modules list if projects share artifactIds
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-209
>                 URL: http://jira.codehaus.org/browse/MSITE-209
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: multi module
>    Affects Versions: 2.0-beta-5, 2.0-beta-6
>            Reporter: John Allen
>            Priority: Critical
>         Attachments: site-patch.diff, site-patch.diff
>
>
> populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....
>     private void populateModulesMenuItemsFromReactorProjects( Menu menu )
>     {
> [SNIP]
>                 if ( reactorProject != null && reactorProject.getParent() != null &&
>                     project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
>                 {
>                     String reactorUrl = reactorProject.getUrl();
>                     String name = reactorProject.getName();
>                     appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
>                 }
>             }
>         }
>     }
> Comparison should also check that the groupId of the reactorProject's parent matches our groupId.
> Clear?.. Sorry, the patch on my laptop too... 

-- 
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: (MSITE-209) populateModulesMenu() logic results in invalid modules list if projects share artifactIds

Posted by "John Allen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121586 ] 

John Allen commented on MSITE-209:
----------------------------------

This is now defunct, modules identification should no longer have any bearing on who their parent is. See MSITE-129

> populateModulesMenu() logic results in invalid modules list if projects share artifactIds
> -----------------------------------------------------------------------------------------
>
>                 Key: MSITE-209
>                 URL: http://jira.codehaus.org/browse/MSITE-209
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: multi module
>    Affects Versions: 2.0-beta-5, 2.0-beta-6
>            Reporter: John Allen
>            Priority: Critical
>         Attachments: site-patch.diff, site-patch.diff
>
>
> populateModulesMenu() logic should compare groupIds as well as artifactIds. Failure to do so can result in invalid modules list being generated when the reactorProject.getParent().getArtifectId() is the same as the current project but is not of the same group. Logic should be (dont have the code available as its on my laptop), oh go on then Ill HTTP the source....
>     private void populateModulesMenuItemsFromReactorProjects( Menu menu )
>     {
> [SNIP]
>                 if ( reactorProject != null && reactorProject.getParent() != null &&
>                     project.getArtifactId().equals( reactorProject.getParent().getArtifactId() ) )
>                 {
>                     String reactorUrl = reactorProject.getUrl();
>                     String name = reactorProject.getName();
>                     appendMenuItem( menu, name, reactorUrl, reactorProject.getArtifactId() );
>                 }
>             }
>         }
>     }
> Comparison should also check that the groupId of the reactorProject's parent matches our groupId.
> Clear?.. Sorry, the patch on my laptop too... 

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