dnault / therapi-runtime-javadoc

Read Javadoc comments at run time.
Apache License 2.0
117 stars 19 forks source link

Released versions don't included Javadoc and/or sources jar #30

Closed bbottema closed 5 years ago

bbottema commented 5 years ago

It seems Javadoc and/or Sources jars are not included in the release to Maven Central. Because of this, when inspecting classes and methods in IntelliJ, all documentation is missing.

I don't know how it works in Gradle, but in maven the following would solve the issue:

<project>
    <build>
    (..)
        <plugins>
            (..)
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <!--<additionalparam>-Xdoclint:none</additionalparam>-->
                            <additionalparam>-Xdoclint:all</additionalparam>
                            <additionalparam>-Xdoclint:-missing</additionalparam>
                            <show>public</show>
                            <nohelp>true</nohelp>
                            <excludePackageNames>*.internal.*</excludePackageNames>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
        </plugins>
    </build>

This causes maven to also generate standard jars for javadoc and sources which are automatically included in the deploy plugin. IDE's like IntelliJ look for these for any dependency they download.

bbottema commented 5 years ago

Nevermind, I just noticed in the sources that I don't see the documentation, because there is none in a lot of places :D I see the documentation in CommentFormatter just fine though. Closing issue.