Skip to content

SITES-14246 Clean up Archetype - #1339

Merged
buuhuu merged 6 commits into
adobe:developfrom
UladzimirLitvinchuk1:feature/SITES-14246_Clean_up_Archetype_v3
Aug 7, 2026
Merged

SITES-14246 Clean up Archetype#1339
buuhuu merged 6 commits into
adobe:developfrom
UladzimirLitvinchuk1:feature/SITES-14246_Clean_up_Archetype_v3

Conversation

@UladzimirLitvinchuk1

@UladzimirLitvinchuk1 UladzimirLitvinchuk1 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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.af is 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.

@bpauli bpauli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. Decoupled SPA remains supported. archetype-metadata.xml:108-110 still permits decoupled, while src/main/archetype/pom.xml:27-29,90-92,899-910 retains spa.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.

  2. Standard HTL output retains SPA components. archetype-post-generate.groovy:319-323 deletes nonexistent components/structure/spa, leaving the actual components/spa, components/remotepage, and components/remotepagenext resources in generated projects. Please remove those resources or target their real directories.

  3. SSR support remains for decoupled output. archetype-post-generate.groovy:320-343 preserves xfpage/body.html; that template invokes cq/remote/content/renderer/request/handler, while xfpage/customfooterlibs.html:16-22 still loads SPA messaging and testing-frontend-react.base. Please remove this remote-renderer/SSR path.

  4. Headless Forms still packages React. archetype-metadata.xml:155-158,346-352, src/main/archetype/pom.xml:46-48, and ui.apps/pom.xml:219-225 retain and package ui.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

  • $isSpaProject now means only frontendModule == "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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 bpauli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:5
  • ui.content/.../content/__appId__/.content.xml:7
  • ui.content/.../content/__appId__/language-masters/.content.xml:6
  • ui.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.af is still wired in via pom.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.core being intentionally kept/deprecated is also stale, since that dependency has been fully removed. Please drop it.

@buuhuu
buuhuu merged commit 70e2ce8 into adobe:develop Aug 7, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants