[ 
https://issues.apache.org/jira/browse/MSITE-1006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838109#comment-17838109
 ] 

Konrad Windszus commented on MSITE-1006:
----------------------------------------

I would expect that those documents which are based on doxia source files 
(editable) take precedence over same-named (generated) reports (not the other 
way around). But there should be a WARNING emitted in case a report would emit 
to a clashing path.

> MSITE-723 causes duplicate document rendering and log output
> ------------------------------------------------------------
>
>                 Key: MSITE-1006
>                 URL: https://issues.apache.org/jira/browse/MSITE-1006
>             Project: Maven Site Plugin
>          Issue Type: Bug
>          Components: doxia integration
>    Affects Versions: 4.0.0-M13
>            Reporter: Michael Osipov
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 4.0.0, 4.0.0-M14
>
>
> Consider the following output:
> {noformat}
> ...
> [INFO] --- maven-site-plugin:3.12.1:site (default-site) @ doxia-skin-model ---
> [INFO] configuring report plugin 
> org.apache.maven.plugins:maven-project-info-reports-plugin:3.4.5
> [INFO] 15 reports configured for maven-project-info-reports-plugin:3.4.5: 
> index, summary, dependency-info, modules, team, scm, issue-management, 
> mailing-lists, dependency-management, dependencies, dependency-convergence, 
> ci-management, plugin-management, plugins, distribution-management
> [INFO] Rendering site with default locale English (en)
> [INFO] Relativizing decoration links with respect to localized project URL: 
> https://maven.apache.org/doxia/doxia-sitetools/doxia-skin-model/
> [INFO] Rendering content with 
> org.apache.maven.skins:maven-fluido-skin:jar:1.11.2 skin.
> [INFO] Skipped "About" report 
> (maven-project-info-reports-plugin:3.4.5:index), file "index.html" already 
> exists.
> [INFO] Rendering 2 Doxia documents: 1 apt, 1 xdoc
> [INFO] Generating "Summary" report              --- 
> maven-project-info-reports-plugin:3.4.5:summary
> [INFO] Generating "Dependency Information" report --- 
> maven-project-info-reports-plugin:3.4.5:dependency-info
> [INFO] Generating "Team" report                 --- 
> maven-project-info-reports-plugin:3.4.5:team
> [INFO] Generating "Source Code Management" report --- 
> maven-project-info-reports-plugin:3.4.5:scm
> [INFO] Generating "Issue Management" report     --- 
> maven-project-info-reports-plugin:3.4.5:issue-management
> [INFO] Generating "Mailing Lists" report        --- 
> maven-project-info-reports-plugin:3.4.5:mailing-lists
> [INFO] Generating "Dependency Management" report --- 
> maven-project-info-reports-plugin:3.4.5:dependency-management
> [INFO] Generating "Dependencies" report         --- 
> maven-project-info-reports-plugin:3.4.5:dependencies
> [INFO] Generating "Dependency Convergence" report --- 
> maven-project-info-reports-plugin:3.4.5:dependency-convergence
> [INFO] Generating "CI Management" report        --- 
> maven-project-info-reports-plugin:3.4.5:ci-management
> [INFO] Generating "Plugin Management" report    --- 
> maven-project-info-reports-plugin:3.4.5:plugin-management
> [INFO] Generating "Plugins" report              --- 
> maven-project-info-reports-plugin:3.4.5:plugins
> [INFO] Generating "Distribution Management" report --- 
> maven-project-info-reports-plugin:3.4.5:distribution-management
> [INFO] Rendering 1 generated Doxia document: 1 xdoc
> ...
> {noformat}
> Let's locate these two handwritten documents:
> {noformat}
> ~/var/Projekte/maven-doxia-sitetools (master =)
> $ tree doxia-skin-model/src/site/
> doxia-skin-model/src/site/
> ├── apt
> │   └── index.apt
> └── site.xml
> 2 directories, 2 files
> {noformat}
> There aren't. This is caused by MSITE-723 which add generated documents for 
> the first round of rendering (non-editable ones), then does the rendering, 
> does reports and then allows generated documents to overwrite report output 
> by running generated rendering again.
> This is suboptimal since it causes:
> * Duplicate rendering
> * Deceiving log output
> * Maven Fluido Skin generates an "Edit Button" for such content sind the 
> editable flag is set to true: 
> view-source:https://maven.apache.org/doxia/doxia-sitetools-archives/doxia-sitetools-2.0.0-M16/doxia-skin-model/skin.html
> The solution to the problem is to flag the document renderer for such output 
> with Sitetools to allow unconditional overwrite. We need to fix Doxia 
> Sitetools first and then we can fix in this plugin.
> Block in question: 
> https://github.com/apache/maven-site-plugin/blob/036997f9a70b7394d9a9771ede04a686aca834e1/src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java#L123-L167
> This needs to be {{true}}: 
> https://maven.apache.org/doxia/doxia-sitetools/doxia-site-renderer/xref/org/apache/maven/doxia/siterenderer/DoxiaDocumentRenderer.html#L61



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to