maartenc commented on code in PR #114: URL: https://github.com/apache/ant-ivy/pull/114#discussion_r2283059221
########## src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java: ########## @@ -343,8 +359,51 @@ private static void printExclusions(ExcludeRule[] exclusions, PrintWriter out, i out.println("</exclusions>"); } - private static DependencyDescriptor[] getDependencies(ModuleDescriptor md, - PomWriterOptions options) { + private static void printOverrides(ModuleDescriptor md, PrintWriter out, int indent, boolean container) { + ModuleRules<DependencyDescriptorMediator> mr = md.getAllDependencyDescriptorMediators(); + if (mr.getAllRules().isEmpty()) { + return; + } Review Comment: Perhaps also return here if none of the rules are an instance of OverrideDependencyDescriptorMediator. This way, we avoid an empty <dependencyManagement>/<dependencies>-construct if container was true. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org