NetBeans Does Not Recognize $ {project.organization} in License Template

Can someone reproduce the following?

In my NetBeans 7.2 project, I set the "project.license" property (in project.properties) to "apache20" so that NetBeans generates the appropriate license text in every new .java file. The license text (which is located in "license-apache20.txt") contains the following FreeMarker link:

${project.organization!user} 

When "project.organization" is not set, it displays my username as expected. In addition, when I set a user name in the User.properties file, that user name is displayed instead. So far so good.

However, I want to set the property "project.organization". But when I do this in the project.properties file, NetBeans simply does not recognize it, showing its username.

When I remove “! User” from the FreeMarker link, it generates the text “Expression project.organization - undefined on line 4, column 59 in“ Templates / Licenses / license-apache20.txt. ”When I set the property to User.properties instead (stupid place, but I did it for the sake of analysis), I get the same behavior. Does anyone know what might be wrong, or how to get NetBeans to find the "project.organization" property? Does anyone have the same behavior on their NetBeans ?

+8
source share
1 answer

In the license-apache20.txt file (or any other license template), change ${project.organization!user} to ${organization!user}

In the NetBean menu, ToolsTemplate , clicking the Settings button opens the User.properties file. Add organization=FooBar Inc

(This is not very ideal, but at least it allows you to customize your organization.)

+6
source

All Articles