如何安装第三方源代码和Javadoc JAR? [英] How to install third party source and javadoc JARs?

查看:124
本文介绍了如何安装第三方源代码和Javadoc JAR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过使用Maven安装第三方源代码和Javadoc JAR?

Is there way to install third party source and javadoc JARs by using maven?

推荐答案

安装第三方JAR的指南

如果您要使用此处提到的有关maven-install-plugin 2.5版本的功能(如果JAR是由Apache Maven构建的,则它将在META-INF目录的子文件夹中包含pom.xml,默认情况下,将通过maven-install-plugin:2.5读取),然后可以运行:

If you want to use the feature mentioned there about version 2.5 of the maven-install-plugin (if the JAR was built by Apache Maven, it'll contain a pom.xml in a subfolder of the META-INF directory, which will be read by default by maven-install-plugin:2.5), then you can run:

mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-fi‌​le -Dfile=<path-to-jar-file>

要为Javadoc生成jar文件,请使用以下来源:

To generate the jars for the javadoc and the sources use e.g.:

Maven部署插件

Maven Javadoc插件

Maven源插件

如果要为已安装的jar安装辅助工件(例如源jar),请按照此处描述的步骤操作:

If you want to install a secondary artifact (such as the sources jar) for an already installed jar, then follow the step described here: Installing Secondary Artifacts

这篇关于如何安装第三方源代码和Javadoc JAR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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