slachiewicz commented on issue #145:
URL: 
https://github.com/apache/maven-archetypes/issues/145#issuecomment-5234939731

   Adding the empirical half: what a generated project actually contains. I 
observed this directly
   while converting the site documents, before the cause was known.
   
   **What I ran.** On pristine `master` (then `ba8ba7f`), in a clean worktree:
   
   ```
   mvn -B verify -pl maven-archetype-site
   ```
   
   That runs `archetype:integration-test`, which generates the `it-basic` 
project (`basic-site`) from
   the archetype and runs its `goal.txt`, `clean site`. I then listed
   `target/test-classes/projects/it-basic/project/basic-site/target/site/` and 
read the two index
   pages. JDK 21, Maven 3.9.16, macOS.
   
   **What the generated project contains** — every `.html` under `target/site`:
   
   | locale | pages |
   |---|---|
   | `en/` | `index.html`, plus `dependency-info`, `distribution-management`, 
`plugin-management`, `plugins`, `project-info`, `summary` |
   | `fr/` | `index.html`, `faq.html`, `format.html`, `markdown.html`, 
`markdown-velocity.html`, `xdoc.html`, plus the same reports |
   
   **`en/index.html` is not the archetype's page.** Its `<title>` is `About – 
${artifactId}` and its
   body is *"About Maven — There is currently no description associated with 
this project."* — the
   project-info **About** report. `fr/index.html` has `<title>` `Le Site – 
${artifactId}` and the
   real body, *"Site Maven pour votre projet — Félicitations! …"*.
   
   So `src/site/apt/index.apt` is not rendered into `en/`, and `en/index.html` 
only exists because a
   report happens to occupy that filename. The IT's
   `assert new File(context.projectDir, 'target/site/en/index.html').exists()` 
therefore passes on a
   file the archetype did not produce — which is why this has gone unnoticed.
   
   **The five dead links, confirmed by resolving each one:**
   
   ```
   en/index.html links      exists in en/   exists in fr/
     format.html                 NO             yes
     faq.html                    NO             yes
     markdown.html               NO             yes
     markdown-velocity.html      NO             yes
     xdoc.html                   NO             yes
   ```
   
   **One consequence worth recording**: because nothing under the non-localized 
`src/site/**` is
   rendered, any English page there is not exercised by any build. That 
includes the
   `markdown/index.md` added in #144 — only its `fr/` counterpart is actually 
rendered, and that is
   the one I was able to verify. I would not want a reader of that PR to assume 
both locales were
   covered.
   
   For completeness on what #144 does to this: it removes three of the five 
pages and their menu
   entries, so a generated project's `en/` goes from five dead links to two 
(`markdown.html`,
   `markdown-velocity.html`). It neither causes nor fixes the underlying 
behaviour — I verified the
   `en/`-vs-`fr/` split is identical on pristine `master` and on that branch.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to