Sonatype CLM for Maven

8.3. NetBeans IDE

NetBeans IDE supports Maven projects natively and you can simply open a project in the IDE by choosing Open Project from the File menu and navigating to the directory that contains your project.

Once your project is opened, you can expand the Project Files section in the Projects window as displayed in Figure 8.4, “Project View with the pom.xml in NetBeans”. Double-click on the pom.xml file and add the plugin configuration for Sonatype CLM for Maven from Example Configuration of Sonatype CLM for Maven.

figs/web/ide-netbeans-project.png

Figure 8.4. Project View with the pom.xml in NetBeans


If you right-click on the pom.xml file, you can choose Run Maven and Goals, to display the dialog displayed in Figure 8.5, “Maven Goal Setup for a CLM Evaluation in NetBeans”. Enter the configuration as displayed and don’t forget to select Remember as: providing a name. This will allow you to simply start this defined configuration from the Run Maven context menu of the pom.xml file.

figs/web/ide-netbeans-run-maven.png

Figure 8.5. Maven Goal Setup for a CLM Evaluation in NetBeans


After pressing OK the defined Maven execution will start and display the output including any error messages and the link to the produced report in the Sonatype CLM server in the Output window displayed in Figure 8.6, “CLM for Maven Output in the Output Window in NetBeans”. Policy violations can be configured to result in a build failure.

figs/web/ide-netbeans-run-output.png

Figure 8.6. CLM for Maven Output in the Output Window in NetBeans