Adding and Using WSO2 Copyright License in IntelliJ IDEA

Sominda Gamage
3 min readJan 27, 2020

WSO2 provides free open source software that can be used and improved by anyone. Therefore, anyone can become a contributor by getting involved in the WSO2 community and helping with the development of WSO2 projects.

Since we are open source, having a Copyright License is really important since it describes a project file’s permitted usage and ownership. Now let's have a look at adding a license header to our IntelliJ IDEA project files.

Adding the license profile

  • First, open an existing project and open to Preferences.
  • Navigate to Editor > Copyright > Copyright Profiles.
  • Click on the + icon to add a new license profile.
  • After providing a suitable name, you’ll be navigated to the following window.
  • Now add the following template as the copyright template body.
Copyright (c) $today.year, WSO2 LLC. (http://www.wso2.com).

WSO2 LLC. licenses this file to you 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.
  • Click Apply.

Adding Scopes to the Copyright License

  • Navigate to Editor > Copyright and select the added license from the dropdown.
  • Click the + icon at the left bottom of the window to add new scopes.
  • Select the scope All from the dropdown and click OK.

Adding the license to a project file

When you create a file for the first time IDEA will create the license automatically. If not follow the steps below.

  • Navigate to the top of the file and press Control+Return.
  • Select Copyright from the dropdown.
  • This will generate the license header.

All right. That’s it. Now you have successfully configured WSO2 License with IntelliJ IDEA. Cheers.

References: https://www.baeldung.com/intellij-copyright-license-header

--

--