Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/skills/java-coding-skill/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: java-coding-skill
description: "Use this skill whenever editing `*.java` files in the `java/` SDK in order to write idiomatic, well-structured Java code for the Copilot SDK"
description: "Use this skill whenever editing `*.java` files in the `java/` directore of the SDK in order to write idiomatic, well-structured Java code for the Copilot SDK"
---

# Java Coding Skill

## Core Principles

- The SDK is in public preview and may have breaking changes
- Requires Java 17 or later
- Requires GitHub Copilot CLI installed and in PATH
- Uses `CompletableFuture` for all async operations
- Implements `AutoCloseable` for resource cleanup (try-with-resources)
- Requires Java 25 or later for building the jar artifact for Copilot SDK for java.
- Uses the Multi-Relase jar feature JEP 238 https://openjdk.org/jeps/238 with `maven.compiler.release` 17 so that uses running JDK 17 can use the jar.
- Requires GitHub Copilot CLI installed and in PATH.
- Uses `CompletableFuture` for all async operations.
- Implements `AutoCloseable` for resource cleanup (try-with-resources).

## Installation

Expand Down
28 changes: 28 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,26 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<!--
The E2E test harness spawns Node.js child processes
(npx tsx server.ts) whose CWD is inside
target/copilot-sdk/test/harness/. On macOS, orphaned
node processes can briefly hold file descriptors on
the directory tree after the test JVM exits, causing
the first 'mvn clean' to fail with
"Failed to delete target/copilot-sdk".

retryOnError + retryCount give the OS time to reap
those processes before the clean phase gives up.
-->
<retryOnError>true</retryOnError>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -344,6 +364,14 @@
<project.build.finalName>${project.build.finalName}</project.build.finalName>
<project.build.testOutputDirectory>${project.build.testOutputDirectory}</project.build.testOutputDirectory>
</systemPropertyVariables>
<!--
Keep the integration-test JVM aligned with Surefire so
tests like SlashCommandsIT resolve the pinned CLI from
the cloned harness in target/copilot-sdk/nodejs.
-->
<environmentVariables>
<COPILOT_CLI_PATH>${copilot.cli.path}</COPILOT_CLI_PATH>
</environmentVariables>
</configuration>
</plugin>
<plugin>
Expand Down
Loading
Loading