java - 想使用别人项目中maven引入的jar包,就是那个.class文件,要怎么操作?
怪我咯
怪我咯 2017-04-18 10:49:50
0
3
673

自己网上下载的jar包好像比较旧的版本,看别人maven导入的同样jar包有一些新方法就想用别人的那个.class文件,不过好像不可以直接复制粘贴过来

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
迷茫

If you use maven to manage it, the jars you reference are either in your local warehouse or in the central warehouse. You can add his jar to your local repository and then reference it. If you quote it directly, you will search it from the central warehouse (that is, there is a maintained warehouse in the network, and all versions of jars are in it). If you don’t have it, you won’t find it.

阿神

Add the jar package you introduced to pom.xml in the maven project,

<dependency> 
<groupId>javax.servlet</groupId> 
<artifactId>servlet-api</artifactId> 
         <version>1.1.1</version> 
</dependency> 

这样就可以引入别的jar包,可以通过.class文件名,去网上找寻其中maven仓库的名称
伊谢尔伦

Since Maven is used, wouldn’t it be enough to configure the dependencies in the pom and make it consistent with the jar package version used by others?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template