简体   繁体   English

如何纠正 java 项目中的所有有效库?

[英]How to rectify all valid libs in a java project?

I am migrating a java project into a Maven project, so i have to check/validate all listed libs to figure out the uses ones.I mean i have to exclude the not using libraries (jar files).我正在将 java 项目迁移到 Maven 项目中,所以我必须检查/验证所有列出的库以找出用途。我的意思是我必须排除不使用的库(jar 文件)。

So i figured out the one way is to go in.classpath file and comment each classpathentry and build and see if that is being used.And it is very tedious job:) Think about when you have a 20 year old product and with 200+ libs.所以我想出一种方法是 go in.classpath 文件并注释每个类路径条目并构建并查看是否正在使用它。这是非常乏味的工作:) 想想当你有一个 20 年的产品和 200+库。

Please suggest some automate ways to do this in a single go.请建议一些自动化方法在单个 go 中执行此操作。

Intellij tells you which libraries are not used: Files -> Project Structure -> Libraries Intellij 告诉你哪些库没有被使用: Files -> Project Structure -> Libraries

And also in Files -> Project Structure -> Problems以及在Files -> Project Structure -> Problems

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM