Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javadoc of interfaces are not included in generation #10

Open
FroMage opened this issue Sep 15, 2011 · 7 comments
Open

Javadoc of interfaces are not included in generation #10

FroMage opened this issue Sep 15, 2011 · 7 comments
Labels
Milestone

Comments

@FroMage
Copy link
Owner

FroMage commented Sep 15, 2011

Reported by sascha.t...@googlemail.com, Yesterday (22 hours ago)
What steps will reproduce the problem?

  1. 2 maven modules, one with a jax-rs annotated inteface (module A) and one module with the implementation (module B).
  2. Let a java class in module B implement the jax-rs annotated interface in module A.
  3. generate the documentation for module B using maven. Note that the implementation class has no further java doc. Everything is on the interface.

What is the expected output? What do you see instead?
Expected is a documentation with all comments from the implemented interface but you get a documentation where all the rest resources are listed but without any java doc written on the interface. It seems that the java doc from the interface is completely ignored but the annotations from the interface are considered.

What version of the product are you using? On what operating system?
0.9.0 on WinXP/Linux.

Please provide any additional information below.

@FroMage
Copy link
Owner Author

FroMage commented Sep 15, 2011

I think it's a source issue, javadoc needs to have access to the source of the first module for this to work.

@calebjones
Copy link

I'm getting successful generation of docs from interfaces.

Note: my interfaces sources are accessible to maven at build time.

@stanio
Copy link

stanio commented Dec 7, 2011

I'm using the same configuration - interface module A (containing the JAX-RS annotated interfaces and types) and implementation module B (depending on A), and I'm having the same problem. I would appreciate specific configuration example solving the issue. I'm getting empty documentation generated when configured on the interface module A, also.

@stanio
Copy link

stanio commented Dec 7, 2011

Issue #2 "Generate documentation based on interface (without any implementation)" seems related.

@calebjones
Copy link

There's not much to my config. I have multiple interfaces that are annotated with annotations from javax.ws.rs. Absolutely no JAX-RS annotations exist down in my implementations.

Other than that, my code is a standard maven2 project.

Here's my pom.xml reporting snippet:

<reporting>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.7</version>
            <reportSets>
                <reportSet>
                    <configuration>
                        <name>REST Doclets</name>
                        <description>JAXRS-based auto-generated RESTful Doclets</description>
                        <header>
                            <![CDATA[My custom HTML header]]>
                        </header>
                        <footer>
                            <![CDATA[My custom HTML footer]]>
                        </footer>
                        <stylesheetfile>${basedir}/src/site/css/custom.css</stylesheetfile>
                        <doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet>
                        <docletArtifacts>
                            <docletArtifact>
                                <groupId>com.lunatech.jax-doclets</groupId>
                                <artifactId>doclets</artifactId>
                                <version>0.9.0</version>
                            </docletArtifact>
                        </docletArtifacts>
                        <destDir>jaxrsdocs</destDir>
                    </configuration>
                    <reports>
                        <report>javadoc</report>
                    </reports>
                </reportSet>
            </reportSets>
        </plugin>
    </plugins>
</reporting>

@stanio
Copy link

stanio commented Dec 10, 2011

The above configuration may work if you have both the interfaces and implementation classes in the same module (I didn't actually got what's your configuration regarding "my interfaces sources are accessible to maven at build time").

So, the doclet doesn't basically work when configured on the interface module A, because of issue #2. It works when configured on the implementation module B which declares dependency on module A and the javadoc plugin configuration have to include:

    <configuration>
        ...
        <includeDependencySources>true</includeDependencySources>
        ...
    </configuration>

Module A have to be configured to install sources artifact, also:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
            <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                    <goal>jar-no-fork</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

@FroMage
Copy link
Owner Author

FroMage commented Dec 12, 2011

Guys, sorry I won't have time to look into this issue before a while, but if you manage to find and fix the issue I'll merge your pull request.

@wikier wikier modified the milestones: 0.10.2, 0.10.1 Jul 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants