NetBeans IDE specific properties
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.
<project>
[.......]
<properties>
<netbeans.hint.useExternalMaven>true</netbeans.hint.useExternalMaven>
</properties>
</project>
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.
<profilesXml>
<profiles>
<profile>
<id>netbeans-private</id>
<activation>
<property>
<name>netbeans.execution</name>
<value>true</value>
</property>
</activation>
<properties>
<netbeans.hint.useExternalMaven>true</netbeans.hint.useExternalMaven>
</properties>
</profile>
</profiles>
</profilesXml>
Current properties as of NetBeans 6.0 beta 2 are:
- netbeans.hint.useExternalMaven
- 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.
- netbeans.hint.license
- 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.
- netbeans.hint.jdkPlatform
- 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.
- netbeans.hint.deploy.server
- 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.
- netbeans.hint.packaging
- 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
, war
, ejb
, ear
, nbm
.