|
12 | 12 |
|
13 | 13 | <name>GitHub Copilot SDK :: Java</name> |
14 | 14 | <description>SDK for programmatic control of GitHub Copilot CLI</description> |
15 | | - <url>https://github.com/github/copilot-sdk-java</url> |
| 15 | + <url>https://github.com/github/copilot-sdk</url> |
16 | 16 |
|
17 | 17 | <licenses> |
18 | 18 | <license> |
|
30 | 30 | </developers> |
31 | 31 |
|
32 | 32 | <scm> |
33 | | - <connection>scm:git:https://github.com/github/copilot-sdk-java.git</connection> |
34 | | - <developerConnection>scm:git:https://github.com/github/copilot-sdk-java.git</developerConnection> |
35 | | - <url>https://github.com/github/copilot-sdk-java</url> |
| 33 | + <connection>scm:git:https://github.com/github/copilot-sdk.git</connection> |
| 34 | + <developerConnection>scm:git:https://github.com/github/copilot-sdk.git</developerConnection> |
| 35 | + <url>https://github.com/github/copilot-sdk</url> |
36 | 36 | <tag>HEAD</tag> |
37 | 37 | </scm> |
38 | 38 |
|
|
46 | 46 | <properties> |
47 | 47 | <maven.compiler.release>17</maven.compiler.release> |
48 | 48 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
49 | | - <!-- Directory where the copilot-sdk repo will be cloned for tests --> |
50 | | - <copilot.sdk.clone.dir>${project.build.directory}/copilot-sdk</copilot.sdk.clone.dir> |
| 49 | + <!-- Directory of the monorepo root (one level up from java/) --> |
| 50 | + <copilot.sdk.clone.dir>${project.basedir}/..</copilot.sdk.clone.dir> |
51 | 51 | <copilot.tests.dir>${copilot.sdk.clone.dir}/test</copilot.tests.dir> |
52 | 52 | <!-- |
53 | 53 | Path to the Copilot CLI entry point used by the SDK tests. Defaults |
54 | | - to the CLI installed under target/copilot-sdk/nodejs by the |
55 | | - install-nodejs-cli-dependencies execution. Surefire injects this |
| 54 | + to the CLI installed under ../nodejs (the monorepo's nodejs dir) by |
| 55 | + the install-nodejs-cli-dependencies execution. Surefire injects this |
56 | 56 | into the test JVM as the COPILOT_CLI_PATH environment variable, so |
57 | 57 | `mvn verify` is self-contained and the developer never has to set |
58 | 58 | it manually. Override on the command line to point at a different |
59 | 59 | CLI build, e.g.: |
60 | 60 | mvn verify -Dcopilot.cli.path=/some/other/copilot/index.js |
61 | 61 | --> |
62 | 62 | <copilot.cli.path>${copilot.sdk.clone.dir}/nodejs/node_modules/@github/copilot/index.js</copilot.cli.path> |
63 | | - <!-- Set to true (via -Pskip-test-harness) to skip git-clone + npm install of test harness --> |
| 63 | + <!-- Set to true (via -Pskip-test-harness) to skip npm install of test harness --> |
64 | 64 | <skip.test.harness>false</skip.test.harness> |
65 | 65 | <!-- |
66 | 66 | Whether to skip the install-nodejs-cli-dependencies execution |
|
76 | 76 | <!-- Extra JVM args for Surefire; overridden by the jdk21+ profile --> |
77 | 77 | <surefire.jvm.args /> |
78 | 78 | <!-- |
79 | | - The version of the @github/copilot npm package that the reference implementation |
80 | | - commit pinned in .lastmerge depends on. Mirrors the value of dependencies."@github/copilot" |
81 | | - in target/copilot-sdk/nodejs/package.json after the reference impl is cloned/reset to the |
82 | | - commit in .lastmerge. |
| 79 | + The version of the @github/copilot npm package used by the monorepo. |
| 80 | + Mirrors the value of dependencies."@github/copilot" |
| 81 | + in ../nodejs/package.json. |
83 | 82 |
|
84 | 83 | The previously mentioned package.json contains the SINGLE |
85 | 84 | SOURCE OF TRUTH for the Copilot CLI version that all paths |
86 | 85 | (build-test.yml, run-smoke-test.yml, |
87 | 86 | update-copilot-dependency.yml, setup-copilot action) must |
88 | | - pin to. It is updated automatically by |
89 | | - .github/scripts/reference-impl-sync/sync-cli-version-from-reference-impl.sh, |
90 | | - which is called from merge-reference-impl-finish.sh |
91 | | - whenever .lastmerge is updated. |
| 87 | + pin to. |
92 | 88 |
|
93 | | - DO NOT EDIT MANUALLY. To update, run the |
94 | | - reference-impl-sync workflow and deal with the subsequent |
95 | | - PR. |
| 89 | + DO NOT EDIT MANUALLY. |
96 | 90 | --> |
97 | 91 | <readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync>^1.0.49-1</readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync> |
98 | 92 |
|
|
173 | 167 | <artifactId>maven-jar-plugin</artifactId> |
174 | 168 | <version>3.5.0</version> |
175 | 169 | </plugin> |
176 | | - <!-- Clone or update the official copilot-sdk repository for test resources, and copy image to site --> |
177 | | - <plugin> |
178 | | - <groupId>org.apache.maven.plugins</groupId> |
179 | | - <artifactId>maven-antrun-plugin</artifactId> |
180 | | - <version>3.2.0</version> |
181 | | - <executions> |
182 | | - <execution> |
183 | | - <id>clone-or-update-copilot-sdk</id> |
184 | | - <phase>generate-test-resources</phase> |
185 | | - <goals> |
186 | | - <goal>run</goal> |
187 | | - </goals> |
188 | | - <configuration> |
189 | | - <skip>${skip.test.harness}</skip> |
190 | | - <target xmlns:if="ant:if" xmlns:unless="ant:unless"> |
191 | | - <!-- Load the target commit from .lastmerge file --> |
192 | | - <loadfile property="copilot.sdk.commit" srcFile="${project.basedir}/.lastmerge"> |
193 | | - <filterchain> |
194 | | - <striplinebreaks /> |
195 | | - <trim /> |
196 | | - </filterchain> |
197 | | - </loadfile> |
198 | | - |
199 | | - <!-- Check if .git directory exists --> |
200 | | - <condition property="repo.exists"> |
201 | | - <available file="${copilot.sdk.clone.dir}/.git" type="dir" /> |
202 | | - </condition> |
203 | | - |
204 | | - <!-- If repo exists, fetch and reset to the target commit --> |
205 | | - <sequential if:set="repo.exists"> |
206 | | - <echo message="Updating existing copilot-sdk repository to commit ${copilot.sdk.commit}..." /> |
207 | | - <exec executable="git" dir="${copilot.sdk.clone.dir}" failonerror="true"> |
208 | | - <arg value="fetch" /> |
209 | | - <arg value="--depth" /> |
210 | | - <arg value="1" /> |
211 | | - <arg value="origin" /> |
212 | | - <arg value="${copilot.sdk.commit}" /> |
213 | | - </exec> |
214 | | - <exec executable="git" dir="${copilot.sdk.clone.dir}" failonerror="true"> |
215 | | - <arg value="reset" /> |
216 | | - <arg value="--hard" /> |
217 | | - <arg value="FETCH_HEAD" /> |
218 | | - </exec> |
219 | | - </sequential> |
220 | | - |
221 | | - <!-- If repo doesn't exist, clone it at the specific commit --> |
222 | | - <sequential unless:set="repo.exists"> |
223 | | - <echo message="Cloning copilot-sdk repository at commit ${copilot.sdk.commit}..." /> |
224 | | - <delete dir="${copilot.sdk.clone.dir}" quiet="true" /> |
225 | | - <exec executable="git" failonerror="true"> |
226 | | - <arg value="clone" /> |
227 | | - <arg value="--depth" /> |
228 | | - <arg value="1" /> |
229 | | - <arg value="https://github.com/github/copilot-sdk.git" /> |
230 | | - <arg value="${copilot.sdk.clone.dir}" /> |
231 | | - </exec> |
232 | | - <exec executable="git" dir="${copilot.sdk.clone.dir}" failonerror="true"> |
233 | | - <arg value="fetch" /> |
234 | | - <arg value="--depth" /> |
235 | | - <arg value="1" /> |
236 | | - <arg value="origin" /> |
237 | | - <arg value="${copilot.sdk.commit}" /> |
238 | | - </exec> |
239 | | - <exec executable="git" dir="${copilot.sdk.clone.dir}" failonerror="true"> |
240 | | - <arg value="reset" /> |
241 | | - <arg value="--hard" /> |
242 | | - <arg value="FETCH_HEAD" /> |
243 | | - </exec> |
244 | | - </sequential> |
245 | | - </target> |
246 | | - </configuration> |
247 | | - </execution> |
248 | | - </executions> |
249 | | - <dependencies> |
250 | | - <!-- Required for if:set and unless:set --> |
251 | | - <dependency> |
252 | | - <groupId>org.apache.ant</groupId> |
253 | | - <artifactId>ant</artifactId> |
254 | | - <version>1.10.17</version> |
255 | | - </dependency> |
256 | | - </dependencies> |
257 | | - </plugin> |
258 | 170 | <!-- Install harness dependencies --> |
259 | 171 | <plugin> |
260 | 172 | <groupId>org.codehaus.mojo</groupId> |
|
278 | 190 | </execution> |
279 | 191 | <!-- |
280 | 192 | Install the @github/copilot CLI declared by |
281 | | - target/copilot-sdk/nodejs/package.json. This is the CLI |
282 | | - version the SDK tests must run against (independent of |
283 | | - the older pin in test/harness/package.json which is |
284 | | - incidental to harness internals). Mirrors what |
285 | | - .github/workflows/build-test.yml does manually so that |
286 | | - `mvn clean verify` is self-contained: the prior |
287 | | - target/copilot-sdk/nodejs/node_modules is wiped by |
288 | | - clean, but this re-creates it before tests run. |
289 | | - Uses npm ci with the ignore-scripts flag, matching |
290 | | - build-test.yml. |
| 193 | + ../nodejs/package.json. This is the CLI version the SDK |
| 194 | + tests must run against (independent of the older pin in |
| 195 | + test/harness/package.json which is incidental to harness |
| 196 | + internals). Uses npm ci with the ignore-scripts flag. |
291 | 197 | --> |
292 | 198 | <execution> |
293 | 199 | <id>install-nodejs-cli-dependencies</id> |
|
331 | 237 | <!-- |
332 | 238 | Set COPILOT_CLI_PATH for the forked test JVM so the SDK |
333 | 239 | tests transparently use the pinned CLI under |
334 | | - target/copilot-sdk/nodejs/. See the copilot.cli.path |
335 | | - property above for the override mechanism. |
| 240 | + ../nodejs/. See the copilot.cli.path property above for |
| 241 | + the override mechanism. |
336 | 242 | --> |
337 | 243 | <environmentVariables> |
338 | 244 | <COPILOT_CLI_PATH>${copilot.cli.path}</COPILOT_CLI_PATH> |
|
693 | 599 | <surefire.jvm.args>-XX:+EnableDynamicAgentLoading</surefire.jvm.args> |
694 | 600 | </properties> |
695 | 601 | </profile> |
696 | | - <!-- Skip git-clone + npm install of the copilot-sdk test harness --> |
| 602 | + <!-- Skip npm install of the copilot-sdk test harness --> |
697 | 603 | <profile> |
698 | 604 | <id>skip-test-harness</id> |
699 | 605 | <properties> |
|
0 commit comments