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

オープン
#1,920 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Java
スター
2.3k
フォーク
983
平均マージ
4日 14時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PaperMC/Velocity のほかの issue

PaperMC/Velocity の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。