You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Felix Knecht (JIRA)" <ji...@codehaus.org> on 2008/03/04 14:06:28 UTC

[jira] Commented: (MCHANGELOG-75) plugin uses artifactId in multi module builds, regardeless of the module name

    [ http://jira.codehaus.org/browse/MCHANGELOG-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_126019 ] 

Felix Knecht commented on MCHANGELOG-75:
----------------------------------------

I think the problem is in https://svn.apache.org/repos/asf/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java

It uses artifactId to generate the repository path instead of the module name.

private void assembleScmInheritance( Model child, Model parent, String childPathAdjustment, boolean appendPaths )
    {
        if ( parent.getScm() != null )
        {
            Scm parentScm = parent.getScm();

            Scm childScm = child.getScm();

            if ( childScm == null )
            {
                childScm = new Scm();

                child.setScm( childScm );
            }

            if ( StringUtils.isEmpty( childScm.getConnection() ) && !StringUtils.isEmpty( parentScm.getConnection() ) )
            {
                childScm.setConnection(
                    appendPath( parentScm.getConnection(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
            }

            if ( StringUtils.isEmpty( childScm.getDeveloperConnection() ) &&
                !StringUtils.isEmpty( parentScm.getDeveloperConnection() ) )
            {
                childScm
                    .setDeveloperConnection( appendPath( parentScm.getDeveloperConnection(), child.getArtifactId(),
                                                         childPathAdjustment, appendPaths ) );
            }

            if ( StringUtils.isEmpty( childScm.getUrl() ) && !StringUtils.isEmpty( parentScm.getUrl() ) )
            {
                childScm.setUrl(
                    appendPath( parentScm.getUrl(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
            }
        }
    }


> plugin uses artifactId in multi module builds, regardeless of the module name
> -----------------------------------------------------------------------------
>
>                 Key: MCHANGELOG-75
>                 URL: http://jira.codehaus.org/browse/MCHANGELOG-75
>             Project: Maven 2.x Changelog Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: linux, java 1.4, maven 2.0.7
>            Reporter: werner mueller
>
> hallo
> in a multi-module build, when the changelog plugin is configured within the parent pom the location in scm is created using the artifactId. In our projects the actual modules are not named like this.
> we have:
> parentpom.xml
>  - module.a.core.stuff (artifactId module-a-core-stuff)
>  - module.b.core.things (artifactId module-b-core-stuff)
>  - ...
> the parent pom contains the modules section referring to the modules with module.a.core.stuff (the actual folder name)
> the changelog plugin will use the artifactId to look up changes in scm, which will create a wrong path (http://localhost/trunk/module-a-core-stuff instead of http://localhost/trunk/module.a.core.stuff)
> i would like some configuration option in the parent pom to define what name shall be used (${project.artifactId} or ${project.name} for example). so the module name can be matched if it is not the same as the artifactId.
> thanks :)

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