-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up development environment
Please note that this guide is not a 'user guide'. It is not intended for the 'users' who build an application using Netty but for the contributors ('dev') who want to develop Netty itself.
You must use 64-bit operating system.
Your must have 64-bit Oracle JDK 7 or above, Apache Maven 3.1.1 or above, and Git installed on your machine. If you are on Linux, you have to install the following pakcages:
# yum install lsb-core autoconf automake libtool make tar \
glibc-devel libaio-devel openssl-devel apr-devel \
lksctp-tools
# apt-get install autoconf automake libtool make tar \
libaio-dev libssl-dev libapr1-dev \
lksctp-tools
We use native line ending for all source code (i.e. '\n
' for *nix and MacOS X, '\r\n
' for Windows.) Please configure your Git installation so that your build does not fail and you push bad files, following the instructions below:
- Dealing with line endings by Github
- Mind the End of Your Line by Tim Clem, for more information
Netty project team uses IntelliJ IDEA as the primary IDE, although we are fine with using other development environments as long as you adhere to our coding style.
If you are on 64-bit operating system, use the 64-bit version of IntelliJ IDEA. For an instance, the start menu shortcut points to the 32-bit binary even if you are using 64-bit Windows. You'll have to find the idea64.exe
in the installation directory and use it instead. Otherwise, you'll see IntelliJ IDEA complains that it cannot find io.netty:netty-tcnative:windows-x86_32
.
Download this code style configuration and unzip Netty project.xml
into <IntelliJ config directory>/codestyles
directory. Choose 'Netty project' as the default code style.
Download, unzip, and import this inspection profile into your IntelliJ IDEA and use it as the default. See here to learn how to import an inspection profile.
Ensure your modification does not introduce any inspection warning. If you think it's a false positive, suppress the warning by using the @SuppressWarnings
annotation or noinspection
line comment as guided by the IDE. For more information about using the inspector, please refer to the web help pages.
Copyright text:
Copyright $today.year The Netty Project
The Netty Project 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.
Keyword to detect copyright in comments:
The Netty project licenses
Allow replacing copyright if old copyright contains:
The Netty project licenses
- Ensure to use the 64-bit version of Eclipse.
-
Download os-maven-plugin and put it into
<ECLIPSE_INSTALLATION_DIR>/plugins
(Eclipse 4.5) or<ECLIPSE_INSTALLATION_DIR>/dropins
(Eclipse 4.6) directory to work around the problem where m2e does not evaluate an extension specified in ourpom.xml
. (Unlike its name, it's both a Maven plugin and an Eclipse plugin.) - Import the project via the 'File → Import... → Existing Maven Projects' menu.
- Netty project Maven
pom.xml
settings dictate use of Java SE 1.6, while implicitly using Java 7/8 (1.7/1.8) features if present. This may result in compilation errors in Eclipse. There are two ways to work around this problem: - Look in the 'Window → Preferences → Installed JRE' menu: * Make sure you have Java 7/8 installation available under 'Installed JRE' * Map this Java 7/8 installation onto Java 6: 'Installed JRE → Execution Environments → Java SE 1.6'
- Alternatively, Java 7/8 JRE can be selected on per-project basis for each Netty module.