Description
I have a simple maven project with two maven module projects:
AppendTest
-ModuleA
-ModuleB
Listing dependencies to file will only capture the output from the top maven project. Nothing from ModuleA or ModuleB is captured.
mvn dependency:list -DoutputFile=x.txt -DappendOutput=true
Content of x.txt:
The following files have been resolved: none
Running without outputFile property lists also the sub modules as expected:
[INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] AppendTest [INFO] ModuleA [INFO] ModuleB [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building AppendTest 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.10:list (default-cli) @ AppendTest --- [INFO] [INFO] The following files have been resolved: [INFO] none [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ModuleA 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.10:list (default-cli) @ ModuleA --- [INFO] [INFO] The following files have been resolved: [INFO] org.apache.commons:commons-lang3:jar:3.4:compile [INFO] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ModuleB 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-dependency-plugin:2.10:list (default-cli) @ ModuleB --- [INFO] [INFO] The following files have been resolved: [INFO] org.slf4j:slf4j-api:jar:1.7.21:compile [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] AppendTest ......................................... SUCCESS [ 1.519 s] [INFO] ModuleA ............................................ SUCCESS [ 0.043 s] [INFO] ModuleB ............................................ SUCCESS [ 0.031 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.894 s [INFO] Finished at: 2016-11-02T12:13:37+01:00 [INFO] Final Memory: 12M/153M [INFO] ------------------------------------------------------------------------
Problem is the same for dependency:tree.