I would like to export a dependency list for a maven project to a CSV or TSV file.
I know that I can generate a dependency list as part of the "mvn site:site" command, but it is in a very inconvenient format for my needs.
I need a simple CSV file with at least these fields: name, version, download URL, license name, license URL
Is there any existing tool that makes that easy?
I require name and version and this is the solution for me.
Unix offers multiple tools to deal with text. On Windows, open git bash and execute following command:
mvn -o dependency:list | grep ":.*:.*:compile" | sed "s/\[INFO\] \([^:]*\):\([^:]*\):jar:\([^:]*\):compile/\1;\2;\3/" | sort -u
This outputs the compile dependencies as follows:
ch.qos.logback;logback-classic;1.1.1
ch.qos.logback;logback-core;1.1.1
com.fasterxml.jackson.core;jackson-annotations;2.8.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With