如何在Javadoc中包含Google Analytics代码片段? [英] How to include Google Analytics snippet in Javadoc?
问题描述
我想将Google Analytics(分析)Javascript代码包含在我生成的Javadoc HTML输出的头部元素中。我怎么能做到这一点?
我想我可能需要编写一个自定义Doclet,但这可能会成为学习曲线的噩梦。有没有更简单的方法?
您有2个解决方案,使用maven插件Javadoc和
< reporting>
< plugins>
< plugin>
< groupId> org.apache.maven.plugins< / groupId>
< artifactId> maven-javadoc-plugin< / artifactId>
<配置>
< header>< b& gt; test test& lt; / b& gt< / header>
< / configuration>
< / plugin>
< / plugins>
< / reporting>
您可以使用您的Google Analytics(分析)脚本更改我的测试测试,并且不要忘记更改<与<和>与>
,然后你打电话给
mvn clean javadoc:javadoc
或者使用旧方法 http://docs.oracle.com/javase/7 /docs/technotes/tools/windows/javadoc.html#header 与您的html脚本
I would like to include the Google Analytics Javascript code in the head element of my generated Javadoc HTML output. How can I do this?
I figured I may need to write a custom Doclet, but this is probably going to be a nightmare of a learning curve. Isn't there a simpler way?
You have 2 solutions, Using maven plugin Javadoc with
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<header><b>test test</b></header>
</configuration>
</plugin>
</plugins>
</reporting>
you change my "test test" with your google analytics script and don't forget to change < with < and > with > and then you call
mvn clean javadoc:javadoc
or using the old method http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#header with your html script
这篇关于如何在Javadoc中包含Google Analytics代码片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!