How to clean old dependencies from maven repositories?

前端 未结 9 1853
小鲜肉
小鲜肉 2020-12-14 05:19

I have too many files in .m2 folder where maven stores downloaded dependencies. Is there a way to clean all old dependencies? For example, if there is a dependency with 3 di

9条回答
  •  再見小時候
    2020-12-14 05:47

    You need to copy the dependency you need for project. Having these in hand please clear all the tag embedded into tag from POM.XML file in your project.

    After saving the file you will not see Maven Dependencies in your Libraries. Then please paste those you have copied earlier.

    The required jars will be automatically downloaded by Maven, you can see that too in the generated Maven Dependencies Libraries after saving the file.

    Thanks.

提交回复
热议问题