I have a big group of projects and they depend on each others with pom.xml
.
I want to get the relationships of these dependencies among projects in a file by shell. mvn dependency:list
is the key command, but the result is not satisfied.
https://maven.apache.org/plugins/maven-dependency-plugin/list-mojo.html
with the guide, i have use some parameters, but the result is not good enough
now the command is:
mvn dependency:list -DincludeGroupIds=group -DoutputFile=dependency.xml -DappendOutput=true
and the result in dependency.xml is:
group:project1:jar:0.0.1-SNAPSHOT:compile
group:project2:jar:0.0.1-SNAPSHOT:compile
……
I want to select the output of mvn dependency:list
with the format like that:
project1
project2
……
Just no jar
, SNAPSHOT
or complie
words, which are unneeded.
So, I want to konw, how can I get the result output to a file in this format?
Can I just get this result by adding the parameters with mvn dependency:list
?
Although sed
or awk
is an option.