[ https://issues.apache.org/jira/browse/MDEP-943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17855220#comment-17855220 ]
ASF GitHub Bot commented on MDEP-943: ------------------------------------- slawekjaranowski commented on code in PR #414: URL: https://github.com/apache/maven-dependency-plugin/pull/414#discussion_r1640988500 ########## src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java: ########## @@ -226,7 +229,19 @@ public static synchronized void write(String string, File file, boolean append, throws IOException { Files.createDirectories(file.getParentFile().toPath()); - try (Writer writer = Files.newBufferedWriter(file.toPath(), Charset.forName(encoding))) { + OpenOption appendOption; Review Comment: can be a ternary operator 😄 > [REGRESSION] appendOutput for tree goal broken for multi-module project > ----------------------------------------------------------------------- > > Key: MDEP-943 > URL: https://issues.apache.org/jira/browse/MDEP-943 > Project: Maven Dependency Plugin > Issue Type: Bug > Affects Versions: 3.7.0 > Reporter: Jim Sellers > Assignee: Slawomir Jaranowski > Priority: Major > > [appendOutput|https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html#appendOutput] > no longer seems to work for a multi-module project. It only has the > dependency tree for the last module. > {code} > # use example spring project > git clone https://github.com/spring-guides/gs-multi-module.git > cd gs-multi-module/complete > # do a dependency tree > mvn org.apache.maven.plugins:maven-dependency-plugin:3.6.1:tree > -DoutputFile=/tmp/tree-3.6.1.txt -DappendOutput=true > mvn org.apache.maven.plugins:maven-dependency-plugin:3.7.0:tree > -DoutputFile=/tmp/tree-3.7.0.txt -DappendOutput=true > diff /tmp/tree-3.6.1.txt /tmp/tree-3.7.0.txt > wc -l /tmp/tree-3.*txt > 123 /tmp/tree-3.6.1.txt > 1 /tmp/tree-3.7.0.txt > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)