Send maven output to file

后端 未结 3 371
眼角桃花
眼角桃花 2021-02-01 00:32

On Windows 7, I am trying to send the output of a maven-3 command to a text file.

I call the command from the root of the project I am trying to analyze

相关标签:
3条回答
  • 2021-02-01 01:00

    Try mvn -help

     -l,--log-file <arg>  Log file to where all build output will go.                               
    

    mvn <your parameters> --log-file log.txt

    0 讨论(0)
  • 2021-02-01 01:06

    Just give it a try:

    mvn dependency:tree -Dverbose -DoutputFile=resout.out
    

    within the same folder where the pom file is located.

    0 讨论(0)
  • 2021-02-01 01:14

    Old school, but it's what I knew. One caveat is that the mvn command does not return when done to the cli, but for some purposes this is acceptable.

    mvn "-Dexec.args=-classpath %classpath com.mycompany.test" -Dexec.executable=/Downloads/jdk1.7/bin/java exec-maven-plugin:1.2.1:exec > /tmp/Out

    0 讨论(0)
提交回复
热议问题