I have a requirement in which based on module names, I need to do some operations. How to fetch the modules name from pom.xml
in a java class. My pom.xml
has like below :
<artifactId>test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>name1</module>
<module>name2</module>
</modules>
I saw we can get artifactId
and version as below from a property file. Here module is a list how to get the modules names from the list. Any help would be appreciated.
version=${project.version}
artifactId=${project.artifactId}
Thanks
You could
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.