I'm trying to get a simple, machine-parsable list of dependencies from my POM. If I do:
mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:list -f sample.pom
I get a load of pointless [INFO]
output:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - my-group:my-project:jar:1.0
[INFO] task-segment: [org.apache.maven.plugins:maven-dependency-plugin:2.1:list]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:list {execution: default-cli}]
[INFO]
[INFO] The following files have been resolved:
[INFO] com.squareup.picasso:picasso:jar:2.5.2:compile
[INFO] commons-io:commons-io:jar:1.3.2:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Jan 11 14:06:05 GMT 2016
[INFO] Final Memory: 17M/325M
[INFO] ------------------------------------------------------------
which I then have to manually scrape to get the info. If I add the -q
switch
mvn -q org.apache.maven.plugins:maven-dependency-plugin:2.1:list -f sample.pom
I get a download progress message or nothing if it's already local (unless there's an error of course).
Is there really no way to execute the dependency list command, so it just outputs a simple list of downloaded dependencies? Something like:
> mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:list -f sample.pom
com.squareup.picasso:picasso:jar:2.5.2:compile
commons-io:commons-io:jar:1.3.2:compile
>