user2217671
user2217671

Reputation:

Generate Javadoc in Netbeans is disabled

I been looking around for hours and can't seem to find a solution to my problem. I am using Netbeans 8 and I would like to generate a Javadoc. I have formatted my comments to match Javadoc format. But the action menu (generate Javadoc) is disabled to any of the project.

How can I enable it? My project can be seen here: https://github.com/Daytron/SimpleDialogFX

Upvotes: 1

Views: 2358

Answers (2)

Mike Schuler
Mike Schuler

Reputation: 11

Netbeans 8 needs to be restarted sometimes to show the Generate Javadoc.

Upvotes: 1

Sam Harwell
Sam Harwell

Reputation: 99859

I see that you are using Maven for your project. NetBeans' support for Maven is best-in-class since you almost never need to add anything to your Maven project in order for NetBeans to load it properly. To enable Javadoc during your build, simply add the following code to the <plugins> element within your <build> element.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.10.1</version>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals>
                <goal>jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Note: Since generating Javadoc may take a bit of time and those outputs are not necessary for debugging, I recommend only enabling the Javadoc output for a final build. However, the simplest path is certainly to just enable it all the time, which is what I've shown above.

Upvotes: 1

Related Questions