@nx/maven 23.0.0-beta.2 → 23.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/batch-runner.jar +0 -0
- package/dist/executors/maven/maven-batch.impl.d.ts.map +1 -1
- package/dist/executors/maven/maven-batch.impl.js +53 -45
- package/dist/maven-batch-runner-0.0.17.jar +0 -0
- package/dist/nx-maven-adapters/maven3-adapter.jar +0 -0
- package/dist/nx-maven-adapters/maven4-adapter-0.0.17.jar +0 -0
- package/dist/nx-maven-adapters/maven4-adapter.jar +0 -0
- package/dist/plugins/maven-data-cache.js +1 -1
- package/dist/plugins/nodes.d.ts.map +1 -1
- package/dist/plugins/nodes.js +2 -2
- package/package.json +5 -5
package/dist/batch-runner.jar
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maven-batch.impl.d.ts","sourceRoot":"","sources":["../../../src/executors/maven/maven-batch.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAiB,MAAM,YAAY,CAAC;AAKvE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAyE/C;;;GAGG;AACH,wBAA+B,kBAAkB,CAC/C,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAC3C,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"maven-batch.impl.d.ts","sourceRoot":"","sources":["../../../src/executors/maven/maven-batch.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAiB,MAAM,YAAY,CAAC;AAKvE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAyE/C;;;GAGG;AACH,wBAA+B,kBAAkB,CAC/C,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAC3C,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,eAAe,GACvB,cAAc,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAC,CAmItD"}
|
|
@@ -108,64 +108,72 @@ async function* mavenBatchExecutor(taskGraph, inputs, overrides, context) {
|
|
|
108
108
|
const stderrLines = [];
|
|
109
109
|
// Collect terminal output from failed tasks
|
|
110
110
|
const failedTaskOutputs = [];
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
111
|
+
const taskIds = Object.keys(taskGraph.tasks);
|
|
112
|
+
const yielded = new Set();
|
|
113
|
+
try {
|
|
114
|
+
for await (const line of rl) {
|
|
115
|
+
if (line.startsWith('NX_RESULT:')) {
|
|
116
|
+
try {
|
|
117
|
+
const data = JSON.parse(line.slice('NX_RESULT:'.length));
|
|
118
|
+
const result = {
|
|
119
|
+
success: data.result.success ?? false,
|
|
120
|
+
status: data.result.status,
|
|
121
|
+
terminalOutput: data.result.terminalOutput ?? '',
|
|
122
|
+
startTime: data.result.startTime,
|
|
123
|
+
endTime: data.result.endTime,
|
|
124
|
+
};
|
|
125
|
+
if (!result.success && result.terminalOutput) {
|
|
126
|
+
failedTaskOutputs.push(result.terminalOutput);
|
|
127
|
+
}
|
|
128
|
+
yielded.add(data.task);
|
|
129
|
+
yield { task: data.task, result };
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
console.error('[Maven Batch] Failed to parse result line:', line, e);
|
|
126
133
|
}
|
|
127
|
-
yield {
|
|
128
|
-
task: data.task,
|
|
129
|
-
result,
|
|
130
|
-
};
|
|
131
134
|
}
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
else if (line.trim()) {
|
|
136
|
+
stderrLines.push(line);
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (code !== 0 && stderrLines.length > 0) {
|
|
149
|
-
console.error(`[Maven Batch] Process exited with code ${code}. Stderr output:`);
|
|
139
|
+
const exitCode = await new Promise((resolvePromise, rejectPromise) => {
|
|
140
|
+
child.on('close', (code) => {
|
|
141
|
+
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
142
|
+
console.log(`[Maven Batch] Process exited with code: ${code}`);
|
|
143
|
+
}
|
|
144
|
+
resolvePromise(code ?? 0);
|
|
145
|
+
});
|
|
146
|
+
child.on('error', rejectPromise);
|
|
147
|
+
});
|
|
148
|
+
if (exitCode !== 0) {
|
|
149
|
+
if (stderrLines.length > 0) {
|
|
150
|
+
console.error(`[Maven Batch] Process exited with code ${exitCode}. Stderr output:`);
|
|
150
151
|
for (const line of stderrLines) {
|
|
151
152
|
console.error(line);
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
|
-
// Print failed task outputs to stderr so they appear in error.message
|
|
155
155
|
if (failedTaskOutputs.length > 0) {
|
|
156
156
|
console.error('\n[Maven Batch] Failed task outputs:');
|
|
157
157
|
for (const output of failedTaskOutputs) {
|
|
158
158
|
console.error(output);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
throw new Error(`Maven batch runner exited with code ${exitCode}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
// Runner crashed before reporting on every task — backfill so Nx doesn't hang.
|
|
166
|
+
for (const taskId of taskIds) {
|
|
167
|
+
if (!yielded.has(taskId)) {
|
|
168
|
+
yielded.add(taskId);
|
|
169
|
+
yield {
|
|
170
|
+
task: taskId,
|
|
171
|
+
result: {
|
|
172
|
+
success: false,
|
|
173
|
+
terminalOutput: e.toString(),
|
|
174
|
+
},
|
|
175
|
+
};
|
|
167
176
|
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
171
179
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/plugins/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,aAAa,EAAa,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/plugins/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,aAAa,EAAa,MAAM,YAAY,CAAC;AAG3E,OAAO,EAAmB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAU9D;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,aAAa,CAAC,kBAAkB,CA+EzD,CAAC"}
|
package/dist/plugins/nodes.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createNodes = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const internal_1 = require("@nx/devkit/internal");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const types_1 = require("./types");
|
|
7
8
|
const maven_analyzer_1 = require("./maven-analyzer");
|
|
8
9
|
const maven_data_cache_1 = require("./maven-data-cache");
|
|
9
|
-
const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
|
|
10
10
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
11
11
|
/**
|
|
12
12
|
* Maven plugin that analyzes Maven projects and returns configurations
|
|
@@ -34,7 +34,7 @@ exports.createNodes = [
|
|
|
34
34
|
const mavenCache = (0, maven_data_cache_1.readMavenCache)(cachePath);
|
|
35
35
|
// Calculate hashes for all pom.xml directories
|
|
36
36
|
const projectRoots = configFiles.map((file) => (0, path_1.dirname)(file));
|
|
37
|
-
const hashes = await (0,
|
|
37
|
+
const hashes = await (0, internal_1.calculateHashesForCreateNodes)(projectRoots, opts, context);
|
|
38
38
|
// Combine all hashes into a single hash for the cache key
|
|
39
39
|
const hash = (0, devkit_1.hashArray)(hashes);
|
|
40
40
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/maven",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Nx plugin for Maven integration",
|
|
6
6
|
"repository": {
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"author": "Victor Savkin",
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@nx/devkit": "23.0.0-beta.
|
|
50
|
+
"@nx/devkit": "23.0.0-beta.20",
|
|
51
51
|
"@xmldom/xmldom": "^0.8.10",
|
|
52
52
|
"tree-kill": "^1.2.2",
|
|
53
53
|
"tslib": "^2.3.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/jest": "30.0.0",
|
|
57
|
-
"@types/node": "^
|
|
57
|
+
"@types/node": "^24.11.0",
|
|
58
58
|
"@types/xmldom": "^0.1.34",
|
|
59
|
-
"jest": "
|
|
59
|
+
"jest": "30.3.0",
|
|
60
60
|
"memfs": "^4.9.2",
|
|
61
|
-
"nx": "23.0.0-beta.
|
|
61
|
+
"nx": "23.0.0-beta.20",
|
|
62
62
|
"ts-jest": "^29.4.0",
|
|
63
63
|
"typescript": "~5.9.2"
|
|
64
64
|
},
|