Conversation
Run the static UI spec generator in an isolated classloader built from the plugin's own component-tools-webapp graph, so transitive dependencies of connector CARs (e.g. CXF 4 / jakarta servlet) no longer shadow the ones component-server needs and trigger a VerifyError. Make StaticResourceGenerator.route null-safe so the /api/v1/cache/clear route no longer fails with a NullPointerException. Add a unit test and an invoker IT guarding the uispec goal. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scope & Design ReviewCritic Round 1 — Findings
Checked: null-safety of Approval gate: APPROVED — no Blocker or Major findings. 3 Minor noted (non-blocking). Signed: Claude Sonnet 5.5 |
Compliance ReportFiles reviewed (7): StaticResourceGenerator.java, StaticResourceGeneratorTest.java, UiSpecGeneratorMojo.java, talend-component-maven-plugin/pom.xml, uispec-generator.properties, src/it/uispec/pom.xml, src/it/uispec/postbuild.groovy.
No wildcard imports, try-with-resources used, specific exceptions with cause preserved, Apache headers present, Spotless/RAT/checkstyle green (step 5). Critical fixed: 0, Warnings: 0, Info: 3 Signed: Claude Sonnet 5.5 |
…tion knowledge Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…erver Maven 3.10+ rejects duplicate <plugin> declarations for the same groupId/artifactId at POM validation, breaking `mvn -pl <module> -am` and whole-reactor builds that include component-starter-server. The plugin was split into two <plugin> blocks (one carrying <dependencies>, the other <executions>) with identical <configuration>; merge them into a single declaration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The uispec invoker IT's .mvn/jvm.config only opened java.net, java.lang and java.util, missing java.lang.invoke (and others). On JDK 17+ this makes the embedded Meecrowave/Tomcat + CDI server fail at startup with InaccessibleObjectException on MethodHandles$Lookup, failing the IT both locally and on Jenkins CI. Complete the set to match the --add-opens list already used by the root pom's java9 profile. Note: .mvn/ directories are not tracked anywhere else in this repo and are commonly excluded by global gitignore templates; this file was force-added since the invoker plugin requires it to configure the forked build's JVM. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical Maven wrapper and dependency-resolution issues remain, and new UiSpec logic lacks default-build unit coverage.
Review effort: Lite
Findings: 2
Open (4)
What changed in this PR
Fixes talend:uispec classpath conflicts and null-content generation failures.
Changes:
- Isolates UiSpec generator dependencies with a dedicated classloader.
- Makes static routes null-safe with unit coverage.
- Adds integration coverage, filtered dependencies, and documentation updates.
| File | Summary |
|---|---|
talend-component-maven-plugin/src/main/resources/org/talend/sdk/component/maven/uispec-generator.properties |
Defines filtered generator dependency versions. |
talend-component-maven-plugin/src/main/java/org/talend/sdk/component/maven/UiSpecGeneratorMojo.java |
Implements isolated generator loading and dependency resolution. |
talend-component-maven-plugin/src/it/uispec/postbuild.groovy |
Validates generated UiSpec archive contents. |
talend-component-maven-plugin/src/it/uispec/pom.xml |
Adds conflicting dependency integration-test setup. |
talend-component-maven-plugin/src/it/uispec/.mvn/jvm.config |
Configures required JVM module access. |
talend-component-maven-plugin/pom.xml |
Configures resource filtering and generator dependencies. |
repository-knowledge.md |
Documents UiSpec verification guidance. |
component-tools-webapp/src/test/java/org/talend/sdk/component/tools/webapp/standalone/generator/StaticResourceGeneratorTest.java |
Tests null and UTF-8 route content. |
component-tools-webapp/src/main/java/org/talend/sdk/component/tools/webapp/standalone/generator/StaticResourceGenerator.java |
Handles null route content safely. |
component-starter-server/pom.xml |
Alters Maven wrapper generation configuration; execution binding requires correction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Resolve the generator classpath from the project repositories (the webapp, Beam and OpenWebBeans are regular dependencies, not plugins), extract the isolated run into a package-private method and add default build unit tests for the classloader isolation, TCCL restoration and error wrapping. Document the -Pci-build invoker command. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review round 1 — summary
Fixes pushed: Round summary generated by AI. Please resolve threads after verifying the fixes. Signed: GitHub Copilot |
Extract the classpath resolution into a package-private static method and cover it with unit tests using a stubbed RepositorySystem. Hoist the arguments out of the assertThrows lambdas (java:S5778). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review round 2 — summary
Fixes pushed: Round summary generated by AI. Please resolve threads after verifying the fixes. The Sonar gate result will be known once CI re-analyses this push. Signed: Claude Opus 4.8 |




Requirements
Why this PR is needed?
Jira: QTDI-3531 —
talend-component:uispecfails, for two independent reasons:VerifyErrorwhen run on a connectors repo. The plugin classloader realm contains the plugin dependencies plus the transitive dependencies of every connector CAR (844 jars inconnectors). It includescxf-rt-transports-http:4.1.8(jakarta servlet) ahead of3.6.12(javax servlet) thatcomponent-serverneeds, soServiceListGeneratorServletis a jakarta servlet where a javax one is expected.NullPointerExceptioninStaticResourceGenerator.route(...). The/api/v1/cache/clearroute (QTDI-1188) is built withnullcontent, socontent.getBytes(...)fails even with a clean classpath. Nothing testeduispec, so it went unnoticed.What does this PR adds (design/code thoughts)?
StaticResourceGenerator.route(...)is null-safe (null content → empty body) + unit testStaticResourceGeneratorTest.UiSpecGeneratorMojorunsStaticUiSpecGeneratorin an isolatedURLClassLoader(parent = platform loader, TCCL set and restored, loader closed). Its classpath is the Aether-resolved graph of the plugin's owncomponent-tools-webapp+component-runtime-beam+openwebbeans-se, so it no longer depends on CAR transitives in the plugin realm. Versions come from a filtereduispec-generator.properties.src/it/uispec: builds a CAR dependency plus a conflictingcxf-rt-transports-http:4.1.8plugin dependency, runsprepare-repository+uispec, and assertsuispec.zipcontainscomponent/andconfiguration/entries.talend-component-maven-plugin/pom.xml: resource filtering for the properties file andopenwebbeans-sedeclaration.Validation: unit tests, RAT/checkstyle/spotless and invoker IT
uispecgreen;talend-component:uispecvalidated manually inconnectors/cloud/cloud-components-docker(-PPUSH_DOCKER, local SNAPSHOT) producinguispec.zip.Out of scope: changing connectors' POMs, the
webgoal, other mojos' classloader strategy.AI contribution metrics
100%(309/309 changed lines)100%100%AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code