2010-12-02 6 views
1

TLDGenライブラリを使用して、私のクラスの注釈からTLDファイルを構築するのに役立つtaglibプロジェクトがあります。私は、Maven JavaDocプラグインにプラグインして、javadoc:javadoc Mavenの目標を使ってTLDファイルをビルドさせるようにしました。これを処理する部分は次のとおりです。Maven Javadoc PluginとTLDGenで複数のTLDを生成

<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を生成することができます。

しかし、私はその時点で1つの構成要素しか持つことができません。私は2つのレポートセットを使用して、pomのレポートセクションに構成を移動しようとしました。

誰もこれまでにこれを試みたことがありますか、それを正しい方向に向けるのを助けることができますか?乾杯!

答えて

0

この質問が投稿されてからしばらくありましたが、TLDGenを使用して複数のtld生成を行ったのはここです。私はあなたの質問から始めました。プロジェクトの上の人たちがあなたの答えを参考にしてくれたからです:)。

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-javadoc-plugin</artifactId> 
    <version>2.7</version> 
    <configuration> 
     <includes> 
      <include>**</include> 
     </includes> 
     <doclet>org.tldgen.TldDoclet</doclet> 
     <docletArtifacts> 
      <!-- listing all dependencies for tldgen: 
      the tldgen library, commons-logging, commons-io, 
      commons-lang, geronimo-jsp_2.1_spec, log4j, saxon, stax 
      not sure if they have to be listed here, will have to check; if I 
      don't set them I get class not found errors, but I'm guessing I 
      have a misconfiguration --> 
     </docletArtifacts> 
     <show>private</show> 
     <additionalparam> 
      -htmlFolder ${basedir}/target/docs 
      -tldFolder ${basedir}/src/main/java/META-INF 
      -license NONE 
     </additionalparam> 
     <useStandardDocletOptions>true</useStandardDocletOptions> 
     <author>false</author> 
     <encoding>utf-8</encoding> 
    </configuration> 
    <dependencies> 
     <dependency> 
      <groupId>javax.xml.bind</groupId> 
      <artifactId>jsr173_api</artifactId> 
      <version>1.0</version> 
     </dependency> 
    </dependencies> 
    <executions> 
     <execution> 
      <phase>generate-resources</phase>        
      <goals> 
       <goal>javadoc</goal> 
      </goals> 
     </execution> 
    </executions> 
</plugin> 
関連する問題