Project Properties: Maven Project

The Project Properties window for Maven projects enables you to configure project settings.

The Project Properties window contains the following elements.

Element Description

General

The General category enables you to set the following properties.

    Group Id

Specifies the Group Id that is used when building the application.

    Artifact Id

Specifies the Artifact Id, which is based on the project name

    Version

Specifies the version.

    Packaging

Specifies how the application is packaged.

    Name

Specifies the name of the project.

    Description

(Optional) Description of the project.

Sources

The Sources category displays the following properties

    Project Folder

(Read-only) Specifies the location of the parent directory of the project on the local system.

    Source Folder

(Read-only) Specifies the location of the directory that contains the Java source files.

    Test Source Folder

(Read-only) Specifies the location of the directory that contains the Java test files.

    Source/Binary Format

Specifies the JDK version that applies to the lowest Java platform version with which the Java code in your project is compatible. Default options range from JDK 1.3 to 7.

    Encoding

Specifies the character encoding the IDE applies when it saves and displays project source files

Configurations

The Configurations category of the Properties window of a Maven project enables you to create and select custom configurations for your project.

Frameworks

The Frameworks category enables you to add support for a web application framework to the project.

Compile

The Compile category enables you to specify the following properties:

    Compile On Save

This option enables you to choose how the IDE handles Java files when the files are modified and saved. When selected, Java files are compiled when you save them and generated class files are stored in the build directory of the project. This option can save you time when you run or debug your application in the IDE.

    Generate Debugging Info

If selected, the compiled classes will include information necessary for stopping at breakpoints and stepping through the application with the debugger.

    Report Use of Deprecated APIs

If selected, you are notified in the compilation output of any deprecated APIs that the code uses.

Run

The Run category enables you to specify options for running your project. The options available will depende upon the type of project.

    Configuration

Select a Maven configuration from the dropdown list. You can specify the available configurations for the project in the Configurations category.

    Main Class

Specifies the main class for the application.

    Arguments

Specifies arguments to pass to the main class during application execution.

    Working Directory

Specifies a separate working directory that is used during application execution.

    VM Options

Specifies Java virtual machine options to be used for running the main class.

    Server

(Web only) Specifies the server to which the web application is deployed. To register servers, choose Tools > Servers from the main menu.

    Java EE Version

(Web only) Specifies which version of Java EE is to be used.

    Context Path

(Web only) Specifies a way to distinguish resources in one web application from resources in others that are deployed on the same server instance. The context of an application determines the URL namespace of the contents of the web application. When a web application's context property value is set, you access the web application at http://hostname:port/context/servlet_or_jsp. For example, with the property value set to /HelloWeb, you access the web application at http://hostname:port/HelloWeb/index.jsp.

    Relative URL

(Web only) Specifies the URL relative to the context path to run. For example, if you want a specific servlet to be the entry point to a web application, specify the servlet's URL-pattern here. The IDE generates a servlet's URL-pattern in the WEB-INF/web.xml file when you use the New File (Ctrl-N) wizard to create a servlet.

    Browser

(Web only) Sselect the browser that will launch when you run the application.

    Display Browser on Run

(Web only) Specifies whether the browser is displayed.

    Copy Static Resources on Save

(Web only) This option enables you to choose how the IDE handles non-Java files when the files are modified and saved. When selected, the files are automatically copied to the build directory of the project when the files are saved. When not selected the non-Java files are not copied when you save the files. You can invoke the Build command to copy the files to the build directory. This option is automatically enabled when you enable Deploy on Save..

    Deploy on Save

(Web only) When selected, when you save files the Java files are automatically compiled, non-Java files are copied to the build directory and the files are redeployed to the server. Enabling Deploy on Save automatically enables the Copy Static Resources on Save and Compile on Save options. The Deploy on Save option saves you time when you run or debug your application in the IDE and ensures that all new and modified files in the build directory are automatically redeployed to the server.

Actions

The Actions category enables you to bind IDE actions to Maven goals and save the binding in custom configurations.

    Configuration

Select a configuration from the drop down list to save the binding as part of that configuration. You can create new configurations in the Configurations category.

    Actions

Select an IDE action from the list to view the Maven goals that are currently mapped to that action. You can click Add Custom to create a custom action.

    Execute Goals

Add or modify the Maven goals that you want to bind to the item that is selected in the list of Actions.

    Activate Profiles

Enter the profile or profiles that you want to activate when the selected action is invoked.

    Set Propertiess

Enter any properties that you want to set during execution of the action.

Click Add to open a popup menu with common properties.

    Build Recursively (with modules)

When selected, modules are built recursively(in multi-module applications).

    Build With Dependencies

Project dependencies are built when the action is invoked.

CheckStyle Formatting

Enables you to configure POM to add CheckStyle formatting rules.

Hints

The Hints category enables you to configure hints for the project.


Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.