Support additional plugin JAR directories with plugin data kept in the default directory

Đang mở
#1,920 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

Start by tracing CLI argument parsing and plugin loading in Velocity; the issue does not name specific files or tests. Check how plugin JAR discovery, dependency resolution, duplicate-ID checks, and @DataDirectory are currently connected. Done means a repeatable --add-plugin-dir loads JARs from extra directories while plugin data remains under the default plugins/<plugin-id>/ directory, with existing behavior unchanged when the option is omitted.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type: feature
Requested Feature

Add an optional, repeatable CLI argument to load plugin JARs from additional directories, similar to Paper’s --add-plugin-dir:

java -jar velocity.jar --add-plugin-dir /opt/velocity/plugin-jars

Plugin data provided through @DataDirectory should remain under the default plugins/<plugin-id>/ directory, regardless of where the JAR is located.

Plugins from all directories should participate in the same dependency resolution and duplicate-ID checks. Existing behavior should remain unchanged when the argument is not provided.

Why is this needed?

I’m building Docker images containing a specific set of Velocity plugins. The plugin JARs should be included in the image, while configuration and plugin data should persist in an external volume.

Currently, both share the plugins/ directory. Mounting a volume over that directory hides the JARs packaged in the image.

Separating JAR discovery from plugin data storage would allow multiple proxy instances to use the same image, each with its own configuration and data, using one mounted plugin-data directory per instance. Updating the image would update the plugins without replacing their persistent data.

Alternative Solutions

The alternatives I’ve considered are:

  • Mounting each plugin’s data folder individually. This requires maintaining a separate mount for every plugin.
  • Copying image-provided JARs into the mounted directory at startup. This requires synchronization and cleanup logic to prevent removed or outdated plugins from remaining in the volume.
  • Creating symbolic links from the mounted directory to image-provided JARs. This also requires startup and cleanup logic.

An additional plugin directory would support this directly without those workarounds.

Additional Information

The intended layout would be:

/opt/velocity/plugin-jars/   # Plugin JARs packaged in the image
/velocity/plugins/          # Mounted volume for plugin configuration and data

Paper already provides a similar --add-plugin-dir argument.

I’d be interested in contributing a PR if this approach is acceptable to the maintainers.

Ngôn ngữ chính
Java
Star
2.3k
Fork
983
Merge trung bình
4 ngày 14 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PaperMC/Velocity

Tất cả issue của PaperMC/Velocity

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.