使用 Maven Javadoc 插件生成多个 TLD顶级域名生成器
我有一个 taglib 项目,我使用 TLDGen 库来帮助构建我的 TLD 文件我的课程中的注释。然后,我将其插入 Maven JavaDoc 插件,以使其通过 javadoc:javadoc Maven 目标构建 TLD 文件。处理这个问题的 Pom 部分如下:
<build>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<doclet>org.tldgen.TldDoclet</doclet>
<docletArtifact>
<groupId>com.google.code.tldgen</groupId>
<artifactId>tldgen-all</artifactId>
<version>1.0.0</version>
</docletArtifact>
<show>private</show>
<additionalparam>-name test
-uri "http://www.mycompany.com/tags/wibble"
-tldFile ..\..\..\src\main\resources\META-INF\w.tld
</additionalparam>
<useStandardDocletOptions>true</useStandardDocletOptions>
<author>false</author>
<encoding>utf-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
这非常有效。问题是我知道想要从这个项目创建 2 个 TLD。我可以在 addtionalparam 元素中传递 -subpackages 属性,这样我就可以生成一个完全符合我想要的 TLD。
但此时我只能有一个配置元素。我尝试将配置移动到我的 pom 中带有两个报告集的报告部分,看看是否有帮助,但没有运气。
有没有人曾经尝试过这个,并且可以帮助我指出正确的方向以使其正确?干杯!
I've got a taglib project that I use the TLDGen library to help build my TLD files from annotations in my classes. I've then got it plugged into the Maven JavaDoc plugin to have it build the TLD files via the javadoc:javadoc Maven goal. Pom portion that handles this is as follows:
<build>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<configuration>
<doclet>org.tldgen.TldDoclet</doclet>
<docletArtifact>
<groupId>com.google.code.tldgen</groupId>
<artifactId>tldgen-all</artifactId>
<version>1.0.0</version>
</docletArtifact>
<show>private</show>
<additionalparam>-name test
-uri "http://www.mycompany.com/tags/wibble"
-tldFile ..\..\..\src\main\resources\META-INF\w.tld
</additionalparam>
<useStandardDocletOptions>true</useStandardDocletOptions>
<author>false</author>
<encoding>utf-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
And this works fantastically. Trouble is that I know want to create 2 TLD's from this project. I can pass a -subpackages attribute in th addtionalparam element so I can produce a TLD with exactly what I want.
But I can only have one configuration element at that point. I've tried moving the configuration into the reporting section in my pom with two reportsets to see if that helps but no luck.
Has anyone ever attempted this before and can help point me in the right direction for getting it right? Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题发布已经有一段时间了,但以下是我如何使用 TLDGen 生成多个 tld。我从你的问题开始,因为项目中的人使用你的答案作为参考:)。
It's been a while since this question was posted, but here's how I did multiple tld generation with TLDGen. I started from your question, since the guys over at the project used your answer as a reference :).