Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 453602

Summary: [tycho-document-bundle] add support for custom doclets + docletArtifact
Product: z_Archived Reporter: Christian Dietrich <christian.dietrich.opensource>
Component: TychoAssignee: Martin Schreiber <Martin.SCHREIBER>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jan.sievers, Martin.SCHREIBER, t-oberlies
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Sample Doclet
none
Sample Usage of Doclet none

Description Christian Dietrich CLA 2014-11-29 15:20:41 EST
using a custom doclet through javadocOptions (add. args) requires a lot of extra stuff. so having support via a doclet and doclet artifact property would be nice
Comment 1 Martin Schreiber CLA 2014-12-04 03:55:40 EST
Do you expect that to be part of the javadocOptions parameter:

<configuration>
  <javadocOptions>
    <doclet>foo.bar.MyDoclet</doclet>
    <docletArtifacts>
      <docletArtifact>
        <groupId>mygroupid</groupId>
        <artifactId>myartifactid</artifactid>
        <version>1.0</version>
      </docletArtifact>
      <docletArtifact>
        <groupId>myothergroupid</groupId>
        <artifactId>myotherartifactid</artifactid>
        <version>1.0</version>
      </docletArtifact>
    </docletArtifacts>
  </javadocOptions>
</configuration>

or should that be outside of the javadocOption:

<configuration>
  <doclet>foo.bar.MyDoclet</doclet>
  <docletArtifacts>
    <docletArtifact>
      <groupId>mygroupid</groupId>
      <artifactId>myartifactid</artifactid>
      <version>1.0</version>
    </docletArtifact>
    <docletArtifact>
      <groupId>myothergroupid</groupId>
      <artifactId>myotherartifactid</artifactid>
      <version>1.0</version>
    </docletArtifact>
  </docletArtifacts>
</configuration>
Comment 2 Christian Dietrich CLA 2014-12-04 03:56:38 EST
inside the javadoc options would be fine.
Comment 3 Martin Schreiber CLA 2014-12-10 03:31:01 EST
I prepared a patch, to verify it before submitting it would be greate to have a working example. Do you have a simple sample project that you can attach here?
Comment 4 Christian Dietrich CLA 2014-12-11 04:35:40 EST
Created attachment 249334 [details]
Sample Doclet

Sample Doclet
Comment 5 Christian Dietrich CLA 2014-12-11 04:36:21 EST
Created attachment 249335 [details]
Sample Usage of Doclet

Sample Usage of Doclet
Comment 6 Christian Dietrich CLA 2014-12-11 04:36:47 EST
please find the example attached
Comment 7 Martin Schreiber CLA 2014-12-12 02:36:25 EST
Submitted a patch for review: https://git.eclipse.org/r/#/c/37956/
Comment 8 Martin Schreiber CLA 2015-01-08 10:27:14 EST
Now a custom doclet and doclet artifacts can be specified.

Example configuration:

 <configuration>
    <javadocOptions>
       <ignoreError>false</ignoreError>
       <doclet>foo.bar.MyDoclet</doclet>
       <docletArtifacts>
          <docletArtifact>
             <groupId>foo.bar</groupId>
             <artifactId>foo.bar.mydocletartifact</artifactId>
             <version>1.0</version>
          </docletArtifact>
       </docletArtifacts>
    </javadocOptions>
 </configuration>
Comment 9 Christian Dietrich CLA 2015-01-08 11:16:55 EST
this actually seems work only if the doclet artifact is selfcontained or if you lit the doclets dependencies manually. IF the doclet has dependencies these wont be find. using the maven javadoc plugin this worked fine.
Comment 10 Martin Schreiber CLA 2015-01-09 01:37:24 EST
Reopening because the dependencies of the doclet artifacts are not resolved and added to the javadoc class path
Comment 11 Martin Schreiber CLA 2015-01-09 07:04:44 EST
Now also the transitive dependencies will be resolved and added to the doclet path.
Comment 12 Christian Dietrich CLA 2015-01-09 07:36:13 EST
works fine now
Comment 13 Tobias Oberlies CLA 2015-02-26 07:29:22 EST
Would someone write something about this feature on the 0.23 release notes page [1]? I suppose that this feature is worth mentioning.

[1] https://wiki.eclipse.org/Tycho/Release_Notes/0.23
Comment 14 Martin Schreiber CLA 2015-02-26 07:34:33 EST
(In reply to Tobias Oberlies from comment #13)
> Would someone write something about this feature on the 0.23 release notes
> page [1]? I suppose that this feature is worth mentioning.
> 
> [1] https://wiki.eclipse.org/Tycho/Release_Notes/0.23

I will add notes to the Release Notes.

Btw,change submitted with commit:

https://git.eclipse.org/c/tycho/org.eclipse.tycho.extras.git/commit/?id=2c126a87d47dc6ed243504c4d50a88008e24d0f3