Sja*_*aak 10 printing structure pretty-print maven multi-module
我正面临一个相当大的多模块maven项目.我想看看root(父)项目是如何以groupId:artifactId的形式由子项目/子项目组成的(可能有一些标识来反映层次结构).
当然我可以编写自己的插件来获得这个打印输出,但我认为必须有一些可用的架子.
你好迟到的答案,但我已经添加了一个插件到maven存储库:
<dependency>
<groupId>org.qunix</groupId>
<artifactId>structure-maven-plugin</artifactId>
<version>0.0.1</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
要运行该插件,您需要添加到您的pom中,如下所示:
<build>
<plugins>
<plugin>
<groupId>org.qunix</groupId>
<artifactId>structure-maven-plugin</artifactId>
<version>0.0.1</version>
<inherited>false</inherited>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>
printModules
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Run Code Online (Sandbox Code Playgroud)
然后输出将如下所示:
[INFO] --- structure-maven-plugin:0.0.1:printModules (default) @ test ---
[INFO]
Project structure (all modules):
test
|
|__ a
|
|__ b
|
|
\__ c
|
|__ d
|
|__ e
|
|__ f
Run Code Online (Sandbox Code Playgroud)
如果要打印所有模块的文件,请使用以下目标:printAll或者如果只想让文件夹使用目标:printFolders.<inherited>意味着也不要在模块中执行插件,并且<ignore>意味着使用正则表达式模式跳过这些文件.
编辑:你从github永远不会有版本:https://github.com/buraksarac/MavenStructurePlugin