Using a relative path (.execute(['dependency:tree'], { 'sort': true, outputFile: 'dependencies.tree' });) is OK but generate the file in my Maven project folder (first workaround)
Exexuting directly Maven command on a terminal under my Maven project folder and outputing the result file to my JS script folder (mvn dependency:tree -DoutputFile="/path/to/my/js-script/dependencies.tree") is OK, but breaks the automation (second workaround)
Finally, I can do my job with theses workarounds and thank you for this usefull library for scripting my Maven migration. But I spent a lot of my poor brain on this strange behaviour and maybe you could explain me the difference between terminal command and nodeJs script?
Hi !
I'm facing a strange behaviour with this code :
The output format of tree (with
+
,-
and\
) is lost when I'm using an absolute path like${__dirname}
. For example :Will become :
.execute(['dependency:tree'], { 'sort': true, outputFile: 'dependencies.tree' });
) is OK but generate the file in my Maven project folder (first workaround)mvn dependency:tree -DoutputFile="/path/to/my/js-script/dependencies.tree"
) is OK, but breaks the automation (second workaround)Finally, I can do my job with theses workarounds and thank you for this usefull library for scripting my Maven migration. But I spent a lot of my poor brain on this strange behaviour and maybe you could explain me the difference between terminal command and nodeJs script?