private void appendAllInternalDependencies(StringBuilder builder){
  for (  String artifactId : internalCompileScopeDependencies.keySet()) {
    List<String> exclusions=new ArrayList<>();
    exclusions.addAll(internalCompileScopeDependencies.get(artifactId));
    SortedSet<ExternalDependency> extDeps=allExternalDependencies.get(artifactId);
    if (null != extDeps) {
      for (      ExternalDependency externalDependency : extDeps) {
        if (!externalDependency.isTestDependency && !externalDependency.isOptional) {
          exclusions.add(externalDependency.groupId + ':' + externalDependency.artifactId);
        }
      }
    }
    String groupId="org.apache." + artifactId.substring(0,artifactId.indexOf('-'));
    appendDependencyXml(builder,groupId,artifactId,"      ","${project.version}",false,false,null,exclusions);
  }
}

private void appendAllInternalDependencies ( StringBuilder builder ) { for ( String artifactId : internalCompileScopeDependencies . keySet ( ) ) { List < String > exclusions = new ArrayList < > ( ) ; exclusions . addAll ( internalCompileScopeDependencies . get ( artifactId ) ) ; SortedSet < ExternalDependency > extDeps = allExternalDependencies . get ( artifactId ) ; if ( null != extDeps ) { for ( ExternalDependency externalDependency : extDeps ) { if ( ! externalDependency . isTestDependency && ! externalDependency . isOptional ) { exclusions . add ( externalDependency . groupId + ':' + externalDependency . artifactId ) ; } } } String groupId = "org.apache." + artifactId . substring ( 0 , artifactId . indexOf ( '-' ) ) ; appendDependencyXml ( builder , groupId , artifactId , "      " , "${project.version}" , false , false , null , exclusions ) ; } }
for each artifact in the project , append a dependency with version $ { project . version } to the grandparent pom ' s & lt ; dependencymanagement & gt ; section . an & lt ; exclusion & gt ; is added for each of the artifact ' s dependencies .
