Friday, December 28, 2007

How to set the License for a project in Netbeans 6.0

To set the project license on a per project basis, you need to set a property called project.license to the value of the license you want to use. For example: If I want to use the Apache 2.0 license, I need to set the property to project.license=apache20. This is accomplished by opening the project files and going to the nbproject directory. You will see a file called project.properties, double click on it to edit it.

You then add the line to the of the properties and save. Any java source files created now will contain the Apache 2.0 license.

/*
* Copyright 2007 John Yeary.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied.
* See the License for the specific language governing
* permissions and limitations under the License.
* under the License.
*/

3 comments :

Popular Posts