问题描述
我现在使Maven javadoc插件运行良好,但是我不知道如何通过scp将其添加到远程目录中.
I have Maven javadoc plugin working nicely right now, but I do not know how to add it to the remote directory via scp.
我如何通过scp传输javadoc文件,但是在生成它们之后呢?当我致电site:site时,会自动发生吗?
How do I transfer the javadoc files via scp, but AFTER they have been generated? Can this automatically happen when I call site:site?
谢谢!
推荐答案
maven-javadoc-plugin默认不附加到任何阶段/目标,您需要在pom.xml中手动配置它.
maven-javadoc-plugin doesn't attach to any phase/goal by default, you need configure it manually in pom.xml.
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<configuration>
...
</configuration>
</plugin>
</plugins>
...
</reporting>
...
</project>
当您执行mvn网站时,将生成javadocs并将其包含在生成的网站中.到javadocs的链接将添加到项目报告"菜单中.
When you execute mvn site, the javadocs will be generated and included in the generated site. A link to the javadocs will be added in the Project Reports menu.
或者,如果您使用maven-release-plugin,则默认情况下将自动处理javadoc生成(和上传),请参见此处:
-
工件id-version.jar
项目当前版本的二进制文件.
artifact id-version.jar
The binaries for the current release of the project.
工件id-version-javadoc.jar
解释当前版本中类的当前功能的javadoc.
artifact id-version-javadoc.jar
The javadoc explaining the current functionality of the classes within the current release.
工件id-version-source.jar
用于构建项目当前版本的源代码修订版.
artifact id-version-source.jar
The source code revisions used to build the current release of the project.
工件id-version.pom
用于创建项目当前版本的pom.xml文件的内容.
artifact id-version.pom
The contents of the pom.xml file used to create the current release of the project.
如果要将Javadoc生成附加到站点以外的某个阶段/目标,请检出如何部署Javadoc jar文件?
这篇关于在Maven中生成javadoc,然后通过scp上传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!