[
https://issues.apache.org/jira/browse/MDEP-943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17854875#comment-17854875
]
Slawomir Jaranowski commented on MDEP-943:
------------------------------------------
Thanks for reports ... looks like method {{DependencyUtil#write}} is broken
{code:java}
public static synchronized void write(String string, File file, boolean append,
String encoding)
throws IOException {
Files.createDirectories(file.getParentFile().toPath());
try (Writer writer = Files.newBufferedWriter(file.toPath(),
Charset.forName(encoding))) {
writer.write(string);
}
} {code}
{{append}} parameter is not used ...
> 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
> 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)