六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 180|回复: 0

Maven2 Plugins让你重新认识你的项目的Dependencies!

[复制链接]

升级  76.67%

45

主题

45

主题

45

主题

秀才

Rank: 2

积分
165
 楼主| 发表于 2013-2-7 21:13:01 | 显示全部楼层 |阅读模式
       前段时间在网上发现了一个好东西,是Maven2的一个reporting插件,可以让你看到项目的Dependencies之间的关系,还有树等,实在太强了,下面我将会介绍一下使用方法,及贴上一些生成的图!
 
具体介绍请参阅:
http://maven.apache.org/plugins/maven-project-info-reports-plugin/index.html
 
使用方法介绍:
在你的项目的pom里,<project>与</project>标签之间,插入下面一段xml代码
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>
                   maven-project-info-reports-plugin
                </artifactId>
            </plugin>
        </plugins>
    </reporting>
如果是有多个Modules的项目,只在最顶层的pom里加即可看到整个project的Dependencies关系,然后用命令行进入加了这个插件的project的根目录
运行 mvn project-info-reports:dependencies 只生成dependencies关联信息

运行 mvn site 生成项目所有相关信息,下面为这些信息的列表

AboutThere is currently no description associated with this project.
Continuous IntegrationThis is a link to the definitions of all continuous integration processes that builds and tests code on a frequent, regular basis.
DependenciesThis document lists the project's dependencies and provides information on each dependency.
Issue TrackingThis is a link to the issue management system for this project. Issues (bugs, features, change requests) can be created and queried using this link.
Mailing ListsThis document provides subscription and archive information for this project's mailing lists.
Project LicenseThis is a link to the definitions of project licenses.
Project PluginsThis document lists the build plugins and the report plugins used by this project.
Project SummaryThis document lists other related information of this project
Project TeamThis document provides information on the members of this project. These are the individuals who have contributed to the project in one form or another.
Source RepositoryThis is a link to the online source repository that can be viewed via a web browser.
 
 

下面贴几个图出来给大家瞧瞧
<a target="_blank" href="http://img.blog.163.com/photo/Ud9eXa3-fDGFkpm7Ac0lPw==/3405284268245999789.jpg" /> 

<a target="_blank" href="http://img.blog.163.com/photo/QuX_RZVs-WRXDnEGITPMjw==/4526962050438074959.jpg" />

 
 
 
 
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表