From 2f2bf2bb089c81186e08a9dea41f26b744daa440 Mon Sep 17 00:00:00 2001
From: Pim van der Loos The Maven plugin provisions its embedded runtime agent automatically. The Maven plugin provisions its embedded runtime agent automatically. Your plugin under test must be
+ listed explicitly in The For a separate integration-test module, reference the plugin module's built JAR or use
+ Put this configuration in Maven Failsafe. Run integration tests with Put this configuration in Maven Failsafe in the module containing the integration tests. Run integration
+ tests with Use Java 21+, Maven 3.9+, and Linux or macOS for Unix-domain sockets. Your LightKeeper version must
contain IDE test setup. Keep the prepare-server execution and framework dependency. From the directory containing the test module's The execution ID after From a multi-module project root, select the test module by its Alternatively, point Maven directly at the test module's POM. Replace the example path with your own: The text after Select only the test module for this preparation command. Use Each test module owns its 1. Add framework dependency
2. Configure prepare + cleanup goals
- plugins; it is not selected automatically from the current project.
+ <plugin>
<groupId>com.github.PimvanderLoos.LightKeeper</groupId>
<artifactId>lightkeeper-maven-plugin</artifactId>
@@ -74,6 +75,12 @@ 2. Configure prepare + cleanup goals
<serverType>paper</serverType>
<userAgent>LightKeeper/${project.version} (https://example.com/my-plugin)</userAgent>
<runtimeManifestPath>${project.build.directory}/lightkeeper/runtime-manifest.json</runtimeManifestPath>
+ <plugins>
+ <plugin>
+ <sourceType>path</sourceType>
+ <path>${project.build.directory}/${project.build.finalName}.jar</path>
+ </plugin>
+ </plugins>
</configuration>
</execution>
<execution>
@@ -88,11 +95,26 @@ 2. Configure prepare + cleanup goals
</execution>
</executions>
</plugin>userAgent may be set in the plugin-level configuration, as a shared value,
+ or in an execution's configuration, as shown here. Execution-level values override shared
+ values with the same name. Both locations are valid; moving it does not require a LightKeeper version change.
+ Replace the example project URL with your own contact URL or email address.path above refers to the JAR built by this Maven module, normally
+ target/<artifactId>-<version>.jar. During mvn verify, Maven runs
+ package before LightKeeper's pre-integration-test preparation, which copies the JAR
+ into the test server's plugins/ directory. The file must exist when preparation runs.
+ If shading or another packaging step produces a separate deployable JAR, point path to that
+ output, including its classifier if applicable. Use the same JAR you would install on a normal server.sourceType=maven with its groupId, artifactId, and version.
+ The path above always refers to the module containing this configuration.3. Pass runtime manifest to tests
- mvn verify. For IDE gutter launches, use the IDE setup guide.mvn verify. For IDE gutter launches, use the IDE setup guide,
+ including its module-selection commands when running from a multi-module project root.<systemPropertyVariables>
<lightkeeper.runtimeManifestPath>
${project.build.directory}/lightkeeper/runtime-manifest.json
diff --git a/ide-testing.html b/ide-testing.html
index 2056e212..94e546f0 100644
--- a/ide-testing.html
+++ b/ide-testing.html
@@ -39,14 +39,31 @@ Consumer setup
-
+ sourceType=path, package the plugin so the configured JAR exists
+ (mvn package for the single-module setup in Getting Started).
+ For sourceType=maven, install locally developed plugin artifacts with mvn install.
+ Calling prepare-server directly does not run these lifecycle phases.-pl, as shown below.Created IDE test setup or Reused IDE test setup, with the expected module and platform.pom.xml (or your project root for a
+ single-module project), use the execution from Getting Started:
- mvn lightkeeper:prepare-server@prepare-server -Dlightkeeper.ide=true@ must match your POM. In a multi-module project each child owns its
- .lightkeeper/ide/ discovery record. Preparation never selects a parent or sibling runtime.artifactId. Replace
+ my-plugin-e2e with your module's artifact ID; the leading : avoids typing its
+ directory path:
+ mvn -pl :my-plugin-e2e lightkeeper:prepare-server@prepare-server -Dlightkeeper.ide=true
+ mvn -f testing/my-plugin-e2e/pom.xml lightkeeper:prepare-server@prepare-server -Dlightkeeper.ide=true@ must match the preparation execution's <id> in that module's
+ effective POM. For example, an execution named prepare-server-paper requires
+ lightkeeper:prepare-server@prepare-server-paper. The goal name and execution ID are independent.-am when building its dependencies
+ in the earlier packaging/install step; adding it here also selects upstream modules for the preparation goal..lightkeeper/ide/ discovery record. Preparation never selects a parent
+ or sibling runtime automatically.LightKeeper contributor setup
@@ -67,6 +84,8 @@ Daily use, persistence, and refresh
agent after changes requiring new agent/protocol behavior. Matching packaged inputs reuse the runtime;
changed hashes or launch settings create a new preparation.
Worlds, plugin data, and other server state persist across runs. To start fresh:
+Run this from the test module's directory, or retain the same -pl/-f selection
+ and execution ID used during initial setup:
mvn lightkeeper:prepare-server@prepare-server -Dlightkeeper.ide=true -Dlightkeeper.ide.refresh=true
Refresh creates a new preparation and switches later launches atomically. It never changes a runtime held by an active test. Old preparations are not pruned automatically. For a complete reset, close @@ -83,6 +102,15 @@
No plugin found for prefix 'lightkeeper': Maven could not resolve the plugin before LightKeeper
+ could run. In a multi-module project, first check that you selected the test module with -pl,
+ -f, or by running from its directory. A plugin declared only in a child POM is not visible in
+ the root POM. Verify that the selected module declares the LightKeeper Maven plugin and version, and that
+ its artifact is installed locally or available through the configured pluginRepositories.
+ See Getting Started for repository setup.
Using fully qualified plugin coordinates can bypass prefix lookup, but it does not select a child module + or load that child's execution configuration. Moving the plugin declaration into the root POM also does + not make preparation automatically choose the test module.
Missing or corrupt discovery: repeat preparation in the owning module. Moved checkout: repeat setup at
the new path. Stale runtime: rebuild packaged inputs, then prepare again. Busy runtime: close the
other test/server. Dirty state: use -Dlightkeeper.ide.refresh=true. Missing server cache: