如何安装第三方源代码和Javadoc JAR? [英] How to install third party source and javadoc JARs?
问题描述
是否可以通过使用Maven安装第三方源代码和Javadoc JAR?
Is there way to install third party source and javadoc JARs by using maven?
推荐答案
如果您要使用此处提到的有关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-file -Dfile=<path-to-jar-file>
要为Javadoc生成jar文件,请使用以下来源:
To generate the jars for the javadoc and the sources use e.g.:
如果要为已安装的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屋!