NetBeans IDE specific properties
Please note: The sources for NetBeans Maven support have been moved to netbeans.org. Any tutorials referenced from this site might be outdated and not reflecting the current UI and feature set in NetBeans 6.5 and beyond.
See the ultimate source of information - Best Practices for Apache Maven in NetBeans 6.x
There are a few magic properties that can be used to tweak NetBeans IDE. Some are set by the UI in the IDE as well.
Generally you want to set the property directly in your pom.xml file. See below for an example. If the property is settable by UI in the IDE, it will by default place the property at the same place. In case of multimodule projects you can also consider putting the properties into the parent POM file to configure multiple/all projects at once.
Alternatively if you don't want to put any IDE specific settings into a shareable pom.xml file you can include the settings into profiles.xml as well. See snippet below. The netbeans-private profile is always activated when loading the project within NetBeans. Whenever the property location is overriden to be in profiles.xml, the UI shall respect that and update th value there, rather than editing your pom.xml.
Current properties as of NetBeans 6.0 beta 2 are:
- Allowed values are true or false. Designates if you want to execute builds of this project by the internal embedded version of Maven (equals Maven 2.0.4) or rather use an external command-line tool you previously setup in the Tools/Options dialog. Use whenever a maven plugin requires Maven 2.0.5 or later for execution.
- Designates the License header template to be used within the project. You need to create the license template first. Go to Tools/Templates and create a new entry under Licenses. The format of teh template file name needs to be license-FOO.txt. Your netbeans.hint.license property takes FOO as value then.
- A workaround for missing Java Platform functionality. This property will not influence the actual build by Maven. However it will provide correct code completion and javadoc for the JDK at hand. The value for the property can be tricky to find out at the visual representation in the IDE is different from the actual value. The best approach is to create a sample j2se ant project, set the requested Java Platform and examine the nbproject/project.properties file. Look for platform.active property value.
- Denotes which j2ee server to deploy to. Only affects ear/ejb/war packaged projects. For ejb and war, it can be set from the UI.
- Added in post-beta2 builds. A lot of IDE functionality is tied to packaging. Default IDE action mappings, file templates, customizer panels etc. The property if defined, instructs the IDE to handle the project as if it were of the specified packaging. Useful when your project defines custom packaging but in most respects is same as the default packagings. The possible values for the property include jar