Build a Netty‑Powered Real‑Time Chat Plugin for IntelliJ IDEA
This guide walks you through creating XEChat‑Idea, a Netty‑based instant messaging and game‑battle plugin for IntelliJ IDEA, covering project structure, environment setup, build commands, server deployment, plugin configuration, packaging, and installation steps.
XEChat‑Idea
❝ Netty‑based instant chat plugin for IDEA ❞
Project Overview
Main features:
Instant chat
Game battle
Project Structure
├── LICENSE
├── README.md
├── xechat-commons // common module
│ ├── pom.xml
│ └── src
├── xechat-plugin // IDEA plugin side
│ ├── build.gradle
│ ├── gradle
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── settings.gradle
│ └── src
└── xechat-server // server side
├── pom.xml
└── srcEnvironment Requirements
Server & Common Module
JDK 8
Maven 3.6.x
IDEA Plugin Side
JDK 11
Gradle 6.x
IntelliJ IDEA 2021.2.x
Build & Run
Build the common module and install it to the local Maven repository:
# Enter the common module directory
cd xechat-commons
# Install to local repository
mvn installServer
Adjust the log configuration file src/main/resources/logback.xml if needed, then run the main class: XEChatServer.java To deploy the server:
# Enter the server directory
cd xechat-server
# Package the server
mvn package
# Start the server
java -jar target/xechat-server-xxx.jarIDEA Plugin
Configure IDEA Version
Edit build.gradle to match your local IDEA version:
intellij{
version '2021.2'
}Local Run
❝ Tasks > intellij > runIde ❞
Plugin Deployment
❝ Reminder: modify server address ❞
Open cn.xeblog.plugin.client.XEChatClient and change the host and port constants:
private static final String HOST = "localhost"; // server IP
private static final int PORT = 1024; // server portPackage the Plugin
❝ Tasks > build > assemble ❞
The packaged file is located at:
build/distributions/xechat-plugin-xxx.zipInstall the Plugin
❝ IDEA > Preferences > Plugins ❞
Choose the generated zip file to install.
Add Plugin Repository (Optional)
Configure a custom repository:
http://plugins.xttblog.cnAfter adding the repository, search for "xechat" in the plugin marketplace to install.
If you have the conditions, you can also deploy the server yourself.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
