SITES-14246 Clean up Archetype - #1339
Conversation
bpauli
left a comment
There was a problem hiding this comment.
Reviewed against SITES-14246, which requires removing everything related to Angular/React SPA frontends and SSR support so the archetype supports only standard HTL components.
Blocking spec findings
-
Decoupled SPA remains supported.
archetype-metadata.xml:108-110still permitsdecoupled, whilesrc/main/archetype/pom.xml:27-29,90-92,899-910retainsspa.project.core. The exception described in this PR is not present in Jira. Please remove the decoupled SPA option and its dependency/template branches, or first record an approved scope change in Jira. -
Standard HTL output retains SPA components.
archetype-post-generate.groovy:319-323deletes nonexistentcomponents/structure/spa, leaving the actualcomponents/spa,components/remotepage, andcomponents/remotepagenextresources in generated projects. Please remove those resources or target their real directories. -
SSR support remains for decoupled output.
archetype-post-generate.groovy:320-343preservesxfpage/body.html; that template invokescq/remote/content/renderer/request/handler, whilexfpage/customfooterlibs.html:16-22still loads SPA messaging andtesting-frontend-react.base. Please remove this remote-renderer/SSR path. -
Headless Forms still packages React.
archetype-metadata.xml:155-158,346-352,src/main/archetype/pom.xml:46-48, andui.apps/pom.xml:219-225retain and packageui.frontend.react.forms.af. This conflicts with Jira's standard-HTL-only requirement. Please remove it unless Jira explicitly approves the exception.
Non-blocking maintainability notes
$isSpaProjectnow means onlyfrontendModule == "decoupled"; rename it to reflect that narrowed meaning.frontendModules = ["general"]retains a collection/loop abstraction for one module; direct cleanup would be clearer until multiple interchangeable modules exist.
| // remove clientlibs for decoupled frontend | ||
| assert new File("$appsFolder/clientlibs").deleteDir(); | ||
| } | ||
| def cleanUpFrontendModule(optionFrontendModule, rootPom, rootDir) { |
There was a problem hiding this comment.
The remaining Sites SPA cleanup is missing here. Four resources are still copied into every generated project and explicitly identify themselves as SPA Editor support: components/{accordion,carousel,container,tabs}/new/.content.xml. A full archetype build generated 44 copies across the 11 integration-test projects. Please remove those source resources as part of this cleanup. There are also now-dead $isSpaProject / decoupled Velocity branches in ui.content policies, templates, _sling_configs, and content roots that should be removed.
There was a problem hiding this comment.
@bpauli thanks, I removed the remaining SPA Editor source resources under components/{accordion,carousel,container,tabs}/new/.content.xml. I also took another pass through the related ui.content areas (policies, templates, _sling_configs, and content roots) and did not find any remaining decoupled, $isSpaProject, or other Sites SPA-specific markers on the current branch.
The only remaining new component is components/form/container/new, which appears to be Forms-specific and therefore outside the scope of this Sites cleanup. Please have a look
bpauli
left a comment
There was a problem hiding this comment.
LGTM overall. Re-reviewed at head d16dbf7 against SITES-14246. The round-1 blocking items are resolved: the decoupled frontend option is gone (frontendModule now validates ^(none|general)$), spa.project.core is fully removed, the components/{spa,remotepage,remotepagenext} and accordion/carousel/container/tabs/new resources are deleted, and the groovy cleanup no longer targets nonexistent dirs or preserves the SSR xfpage remote-renderer path.
Approving. Two non-blocking items to clean up (can be follow-up):
1. Dead $isSpaProject Velocity branches remain
isSpaProject is no longer set anywhere (removed from the post-generate groovy), so these always take the falsy path. They are dead code and some reference template dirs this PR deleted (spa-app-template, spa-page-template). Worth removing to finish the cleanup:
ui.content/.../wcm/policies/.content.xml:468,480,766(line 766 also has trailing whitespace)ui.content/.../wcm/templates/.content.xml:7(emits deleted<spa-app-template/>,<spa-page-template/>)ui.content/.../wcm/templates/xf-web-variation/policies/.content.xml:5ui.content/.../content/__appId__/.content.xml:7ui.content/.../content/__appId__/language-masters/.content.xml:6ui.content/.../content/__appId__/us/.content.xml:6
2. PR description is stale
- It says the "headless Forms React artifacts were also removed" - they are intentionally retained (
ui.frontend.react.forms.afis still wired in viapom.xml:44,maven/archetype-metadata.xml:346,ui.apps/pom.xml:222). Removing Forms React is out of scope here and will be handled in a follow-up, so please reword to avoid claiming removal. - The "Important" note about
spa.project.corebeing intentionally kept/deprecated is also stale, since that dependency has been fully removed. Please drop it.
Remove everything from Archetype for AEMCS & AEM 6.5 which is related to:
SPA frontends (Angular & React)
SSR support
Archetype should only support standard HTL components as everything else shall be handled by Universal Editor
Description
This PR updates the AEM Project Archetype to remove the deprecated Sites SPA/SSR project generation paths in scope for SITES-14246.
Specifically, it removes the decoupled frontend option, deletes the remaining Sites SPA-specific components/resources, removes obsolete SPA/SSR template and policy branches, and simplifies the generated Sites output to the standard HTL-based project structure.
As a scope correction, Headless Forms /
ui.frontend.react.forms.afis intentionally retained in this change and is not addressed by this PR.Related Issue
SITES-14246
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
I have signed the Adobe Open Source CLA.
My code follows the code style of this project.
My change requires a change to the documentation.
I have updated the documentation accordingly.
I have read the CONTRIBUTING document.
I have added tests to cover my changes.
All new and existing tests passed.