如何检查jar文件之间的依赖关系? [英] How To Check Dependencies Between Jar Files?

查看:180
本文介绍了如何检查jar文件之间的依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近已经对使用JSF编写的Web系统进行了支持和编程。代码是一种杂乱无章的,是的,没有文档存在。



该系统有超过40个jar库,其中大部分是旧的版本和测试的冗余。要删除一个jar,我必须检查它没有在代码中导入,所以我搜索了代码的jar导入路径(我正在使用IntelliJ IDE),确保它没有被使用,并删除它。



但是,在编译代码之后,测试期间发生了一些运行时错误。我想出我删除了其他现有罐子使用的一些罐子。



问题是,如何确保在删除未被另一个jar使用的jar之前/ java class?



尽管jars已经编译了类,编译的类 do 具有所需库的导入路径。但是我无法用IntelliJ搜索它们(不在jar文件中搜索)。



我现在正在做的唯一方法是测试系统每次我删除一个jar,看看我是否可以崩溃!这是完全不是一个简单的方法,由于大量的功能要测试。



我希望有一个工具,我可以提交一些java文件/ jar,并显示它们之间的依赖关系。

解决方案

我知道有一个JBoss项目JBoss TattleTale出来的工具,可能值得一看:



http://www.jboss.org/tattletale


I recently have taken the support and programming of a web system written in JSF. The code is kind of messy and redundant, and yes, no documentation exists.

The system has over 40 jar libraries, and most of them are redundant due to old versions and testing. To remove one jar, I must check that it's not imported in the code, so I searched the code for the jar import path (I'm using IntelliJ IDE), made sure that it's not used, and removed it.

However, after compiling the code, a number of run-time errors occurred during testing. I figured out that I removed some jars which are used by other existing jars.

The problem, how do I make sure before removing a jar that it's not used by another jar/java class?

Despite that jars have compiled classes, the compiled classes do have the import path of required libraries. But I can't search them with IntelliJ (does not search inside jars files).

The only way that I'm doing now is to test the system every time I remove a jar and see if I can crash it! This is totally not an easy way due to the huge number of features to be tested.

I wish that there is a tool where I can submit a number of java files/jars, and it displays the dependencies between them.

解决方案

I know that there was a tool coming out of the JBoss project called JBoss TattleTale, might be worth taking a look:

http://www.jboss.org/tattletale

这篇关于如何检查jar文件之间的依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆