How to list active sub-modules in a Maven project?

前端 未结 8 1305
长发绾君心
长发绾君心 2020-12-24 13:26

I have a complex project where there are many directories that have POM files, but only some of which are sub-modules (possibly transitively) of a particular parent project.

8条回答
  •  没有蜡笔的小新
    2020-12-24 13:59

    The following script prints artifactId's of all sub-modules:

    mvn -Dexec.executable='echo' -Dexec.args='${project.artifactId}' exec:exec -q

    Example output:

    build-tools
    aws-sdk-java-pom
    core
    annotations
    utils
    http-client-spi
    http-client-tests
    http-clients
    apache-client
    test-utils
    sdk-core
    ...
    

提交回复
热议问题