当前位置: 动力学知识库 > 问答 > 编程问答 >

build - Maven outputs multi-module src and test directories from command line

问题描述:

I used to check maven project's src and test directories from command lines below, respectively:

mvn help:evaluate -Dexpression=project.build.sourceDirectory

mvn help:evaluate -Dexpression=project.build.testSourceDirectory

However, when the project has multiple modules, the above output becomes unreliable. I found each of the above commands outputs exactly one directory, and most of the cases that directory does not even exist in that project! When maven actually builds, it knows to find src and tests in the corresponding module directories.

One example project is Apache Jackrabbit:

https://github.com/apache/jackrabbit

The above command for src outputs the directory that does not exist in this project, but maven knows what are the actual directories to build.

Here, my question is, does maven support any command line options to output all of the src and test directories, when the project has multiple modules that overwrites the default src/test directories? If yes, what is it?

Thanks!

分享给朋友:
您可能感兴趣的文章:
随机阅读: