Skip to content

Commit fdbe357

Browse files
authored
chore(release): 1.125.0 (#5019)
See [CHANGELOG](https://github.com/aws/jsii/blob/bump/1.125.0/CHANGELOG.md)
2 parents 987897b + 3896ec4 commit fdbe357

File tree

6 files changed

+77
-48
lines changed

6 files changed

+77
-48
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
--site-dir ${{ runner.temp }}/site
4141
working-directory: gh-pages
4242
- name: Upload Artifact
43-
uses: actions/upload-artifact@v5
43+
uses: actions/upload-artifact@v6
4444
with:
4545
name: doc-site
4646
path: ${{ runner.temp }}/site/

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
.
8181
# Upload artifact (we'll tar it up to save time)
8282
- name: 'Upload Artifact: built-tree'
83-
uses: actions/upload-artifact@v5
83+
uses: actions/upload-artifact@v6
8484
with:
8585
name: built-tree
8686
path: ${{ runner.temp }}/built-tree.tgz
@@ -173,7 +173,7 @@ jobs:
173173
yarn package
174174
# Upload artifacts
175175
- name: 'Upload Artifact: release-package'
176-
uses: actions/upload-artifact@v5
176+
uses: actions/upload-artifact@v6
177177
with:
178178
name: release-package
179179
path: ${{ github.workspace }}/dist/
@@ -476,7 +476,7 @@ jobs:
476476
# Upload artifact only on main and for latest rosetta
477477
- name: 'Upload Artifact: integtest_aws-cdk-lib'
478478
if: github.ref == 'ref/head/main' && matrix.rosetta == 'latest'
479-
uses: actions/upload-artifact@v5
479+
uses: actions/upload-artifact@v6
480480
with:
481481
name: integtest_aws-cdk-lib
482482
path: ./node_modules/aws-cdk-lib/dist/

.github/workflows/yarn-upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
git add .
106106
git diff --patch --staged > ${{ runner.temp }}/upgrade.patch
107107
- name: Upload Patch
108-
uses: actions/upload-artifact@v5
108+
uses: actions/upload-artifact@v6
109109
with:
110110
name: upgrade.patch
111111
path: ${{ runner.temp }}/upgrade.patch

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [1.125.0](https://github.com/aws/jsii/compare/v1.124.0...v1.125.0) (2026-01-05)
6+
7+
8+
### Bug Fixes
9+
10+
* **jsii-pacmak:** `--mvn-*` arguments aren't passed through ([#5018](https://github.com/aws/jsii/issues/5018)) ([68642d1](https://github.com/aws/jsii/commit/68642d1b5819cba4fc253ddb7d546c0e9315f961))
11+
512
## [1.124.0](https://github.com/aws/jsii/compare/v1.123.0...v1.124.0) (2025-12-30)
613

714

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"rejectCycles": true
1313
}
1414
},
15-
"version": "1.124.0",
15+
"version": "1.125.0",
1616
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
1717
}

packages/jsii-pacmak/lib/targets/java.ts

Lines changed: 64 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ import {
2626
findLocalBuildDirs,
2727
TargetOptions,
2828
} from '../target';
29-
import { subprocess, Scratch, slugify, setExtend, zip } from '../util';
29+
import {
30+
subprocess,
31+
Scratch,
32+
slugify,
33+
setExtend,
34+
zip,
35+
ShellOptions,
36+
} from '../util';
3037
import { VERSION, VERSION_DESC } from '../version';
3138
import { stabilityPrefixFor, renderSummary } from './_utils';
3239
import { toMavenVersionRange, toReleaseVersion } from './version-utils';
@@ -100,11 +107,12 @@ export class JavaBuilder implements TargetBuilder {
100107
);
101108
scratchDirs.push(tempSourceDir);
102109

103-
await resolveMavenVersions(tempSourceDir.directory);
104-
105110
// Need any old module object to make a target to be able to invoke build, though none of its settings
106111
// will be used.
107112
const target = this.makeTarget(this.modules[0], this.options);
113+
114+
await target.resolveMavenVersions(tempSourceDir.directory);
115+
108116
const tempOutputDir = await Scratch.make(async (dir) => {
109117
logging.debug(`Building Java code to ${dir}`);
110118

@@ -348,7 +356,7 @@ export class JavaBuilder implements TargetBuilder {
348356
return filePath;
349357
}
350358

351-
private makeTarget(module: JsiiModule, options: BuildOptions): Target {
359+
private makeTarget(module: JsiiModule, options: BuildOptions): Java {
352360
return new Java({
353361
arguments: options.arguments,
354362
assembly: module.assembly,
@@ -449,13 +457,57 @@ export default class Java extends Target {
449457

450458
public async build(sourceDir: string, outDir: string): Promise<void> {
451459
const url = `file://${outDir}`;
452-
const mvnArguments = new Array<string>();
460+
461+
await this.invokeMaven(
462+
sourceDir,
463+
['deploy', `-D=altDeploymentRepository=local::default::${url}`],
464+
{
465+
retry: { maxAttempts: 5 },
466+
},
467+
);
468+
}
469+
470+
/**
471+
* Run the maven 'versions:resolve-ranges' plugin
472+
*
473+
* Initially, we generate version ranges into the pom file based on the NPM
474+
* version ranges.
475+
*
476+
* At build time, given a dependency version range, Maven will download metadata
477+
* for all possible versions before every (uncached) build. This takes a long
478+
* time, before finally resolving to the latest version anyway.
479+
*
480+
* Instead, we use the Maven 'versions' plugin to resolve our wide ranges to
481+
* point versions. We want the "latest matching" version anyway, and if we don't
482+
* the resolution now (which downloads the .poms of all possible versions) it
483+
* will happen during every single build.
484+
*/
485+
public async resolveMavenVersions(directory: string) {
486+
const versionsPluginVersion = '2.20.1';
487+
await this.invokeMaven(
488+
directory,
489+
[
490+
`org.codehaus.mojo:versions-maven-plugin:${versionsPluginVersion}:resolve-ranges`,
491+
],
492+
{
493+
retry: { maxAttempts: 1 },
494+
},
495+
);
496+
}
497+
498+
private async invokeMaven(
499+
directory: string,
500+
args: string[],
501+
options?: Omit<ShellOptions, 'cwd'>,
502+
) {
503+
// Pass through jsii-pacmak --mvn-xyz=... arguments as --xyz=...
504+
const passThruArgs = new Array<string>();
453505
for (const arg of Object.keys(this.arguments)) {
454506
if (!arg.startsWith('mvn-')) {
455507
continue;
456508
}
457-
mvnArguments.push(`--${arg.slice(4)}`);
458-
mvnArguments.push(this.arguments[arg].toString());
509+
passThruArgs.push(`--${arg.slice(4)}`);
510+
passThruArgs.push(this.arguments[arg].toString());
459511
}
460512

461513
await subprocess(
@@ -464,21 +516,21 @@ export default class Java extends Target {
464516
// If we don't run in verbose mode, turn on quiet mode
465517
...(this.arguments.verbose ? [] : ['--quiet']),
466518
'--batch-mode',
467-
...mvnArguments,
468-
'deploy',
469-
`-D=altDeploymentRepository=local::default::${url}`,
519+
...args,
520+
...passThruArgs,
470521
'--settings=user.xml',
471522
],
472523
{
473-
cwd: sourceDir,
524+
cwd: directory,
474525
env: {
475526
// Twiddle the JVM settings a little for Maven. Delaying JIT compilation
476527
// brings down Maven execution time by about 1/3rd (15->10s, 30->20s)
477528
MAVEN_OPTS: `${
478529
process.env.MAVEN_OPTS ?? ''
479530
} -XX:+TieredCompilation -XX:TieredStopAtLevel=1`,
531+
...options?.env,
480532
},
481-
retry: { maxAttempts: 5 },
533+
...options,
482534
},
483535
);
484536
}
@@ -4056,36 +4108,6 @@ function removeIntersections(x: spec.TypeReference): spec.TypeReference {
40564108
return x;
40574109
}
40584110

4059-
/**
4060-
* Run the maven 'versions:resolve-ranges' plugin
4061-
*
4062-
* Initially, we generate version ranges into the pom file based on the NPM
4063-
* version ranges.
4064-
*
4065-
* At build time, given a dependency version range, Maven will download metadata
4066-
* for all possible versions before every (uncached) build. This takes a long
4067-
* time, before finally resolving to the latest version anyway.
4068-
*
4069-
* Instead, we use the Maven 'versions' plugin to resolve our wide ranges to
4070-
* point versions. We want the "latest matching" version anyway, and if we don't
4071-
* the resolution now (which downloads the .poms of all possible versions) it
4072-
* will happen during every single build.
4073-
*/
4074-
async function resolveMavenVersions(directory: string) {
4075-
const versionsPluginVersion = '2.20.1';
4076-
await subprocess(
4077-
'mvn',
4078-
[
4079-
`org.codehaus.mojo:versions-maven-plugin:${versionsPluginVersion}:resolve-ranges`,
4080-
'--settings=user.xml',
4081-
],
4082-
{
4083-
cwd: directory,
4084-
retry: { maxAttempts: 1 },
4085-
},
4086-
);
4087-
}
4088-
40894111
/**
40904112
* Whether the given property or method needs to be implemented on a $Proxy class
40914113
*

0 commit comments

Comments
 (0)