private void assembleScmInheritance()

in src/main/java/org/apache/maven/plugin/resources/remote/ModelInheritanceAssembler.java [118:146]


    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));
            }
        }
    }