You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "kwin (via GitHub)" <gi...@apache.org> on 2026/04/09 16:39:45 UTC
[PR] Allow to give alternative source directories for sites [maven-site-plugin]
kwin opened a new pull request, #1261:
URL: https://github.com/apache/maven-site-plugin/pull/1261
This relates to
https://github.com/apache/maven-doxia-sitetools/issues/277
Following this checklist to help us incorporate your
contribution quickly and easily:
- [ ] Your pull request should address just one issue, without pulling in other changes.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
Note that commits might be squashed by a maintainer on merge.
- [ ] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
This may not always be possible but is a best-practice.
- [ ] Run `mvn verify` to make sure basic checks pass.
A more thorough check will be performed on your pull request automatically.
- [ ] You have run the integration tests successfully (`mvn -Prun-its verify`).
If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
- [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow to give alternative source directories for sites [maven-site-plugin]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1261:
URL: https://github.com/apache/maven-site-plugin/pull/1261#issuecomment-4273350344
@kwin Please assign appropriate label to PR according to the type of change.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow to give alternative source directories for sites [maven-site-plugin]
Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on code in PR #1261:
URL: https://github.com/apache/maven-site-plugin/pull/1261#discussion_r3072306317
##########
src/main/java/org/apache/maven/plugins/site/render/ReportDocumentRenderer.java:
##########
@@ -128,13 +128,7 @@ public Sink createSink(File outputDirectory, String outputName) {
document = document.substring(0, document.lastIndexOf('.'));
DocumentRenderingContext subSinkContext = new DocumentRenderingContext(
- docRenderingContext.getBasedir(),
- docRenderingContext.getBasedirRelativePath(),
- document,
- docRenderingContext.getParserId(),
- docRenderingContext.getExtension(),
- docRenderingContext.isEditable(),
- docRenderingContext.getGenerator());
+ docRenderingContext.getBasedir(), document, docRenderingContext.getGenerator());
Review Comment:
All other arguments are `null` or false anyhow for report generated documents, please look at the javadoc of the constructors.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow to give alternative source directories for sites [maven-site-plugin]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #1261:
URL: https://github.com/apache/maven-site-plugin/pull/1261#discussion_r3072280206
##########
src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java:
##########
@@ -320,13 +329,20 @@ protected SiteRenderingContext createSiteRenderingContext(Locale locale)
// Generate static site
context.setRootDirectory(project.getBasedir());
+ final SiteDirectory mainSiteDirectory;
if (!locale.equals(SiteTool.DEFAULT_LOCALE)) {
- context.addSiteDirectory(new SiteDirectory(new File(siteDirectory, locale.toString()), true));
+ mainSiteDirectory = new SiteDirectory(new File(this.siteDirectory, locale.toString()), true);
context.addSiteDirectory(new SiteDirectory(new File(generatedSiteDirectory, locale.toString()), false));
} else {
- context.addSiteDirectory(new SiteDirectory(siteDirectory, true));
+ mainSiteDirectory = new SiteDirectory(siteDirectory, true);
context.addSiteDirectory(new SiteDirectory(generatedSiteDirectory, false));
}
+ if (alternativeSiteSourceDirectories != null) {
+ for (File additionalSiteSourceDirectory : alternativeSiteSourceDirectories) {
+ mainSiteDirectory.addAlternativeEditableSourceDirectory(additionalSiteSourceDirectory);
+ }
+ }
+ context.addSiteDirectory(mainSiteDirectory);
Review Comment:
How is the locale cleanly retained?
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow to give alternative source directories for sites [maven-site-plugin]
Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin commented on code in PR #1261:
URL: https://github.com/apache/maven-site-plugin/pull/1261#discussion_r3072310894
##########
src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java:
##########
@@ -320,13 +329,20 @@ protected SiteRenderingContext createSiteRenderingContext(Locale locale)
// Generate static site
context.setRootDirectory(project.getBasedir());
+ final SiteDirectory mainSiteDirectory;
if (!locale.equals(SiteTool.DEFAULT_LOCALE)) {
- context.addSiteDirectory(new SiteDirectory(new File(siteDirectory, locale.toString()), true));
+ mainSiteDirectory = new SiteDirectory(new File(this.siteDirectory, locale.toString()), true);
context.addSiteDirectory(new SiteDirectory(new File(generatedSiteDirectory, locale.toString()), false));
} else {
- context.addSiteDirectory(new SiteDirectory(siteDirectory, true));
+ mainSiteDirectory = new SiteDirectory(siteDirectory, true);
context.addSiteDirectory(new SiteDirectory(generatedSiteDirectory, false));
}
+ if (alternativeSiteSourceDirectories != null) {
+ for (File additionalSiteSourceDirectory : alternativeSiteSourceDirectories) {
+ mainSiteDirectory.addAlternativeEditableSourceDirectory(additionalSiteSourceDirectory);
+ }
+ }
+ context.addSiteDirectory(mainSiteDirectory);
Review Comment:
Can you clarify what is the concern here? The site directory just got an additional field (locale is not touched).
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow to give alternative source directories for sites [maven-site-plugin]
Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on code in PR #1261:
URL: https://github.com/apache/maven-site-plugin/pull/1261#discussion_r3072275548
##########
src/main/java/org/apache/maven/plugins/site/render/ReportDocumentRenderer.java:
##########
@@ -128,13 +128,7 @@ public Sink createSink(File outputDirectory, String outputName) {
document = document.substring(0, document.lastIndexOf('.'));
DocumentRenderingContext subSinkContext = new DocumentRenderingContext(
- docRenderingContext.getBasedir(),
- docRenderingContext.getBasedirRelativePath(),
- document,
- docRenderingContext.getParserId(),
- docRenderingContext.getExtension(),
- docRenderingContext.isEditable(),
- docRenderingContext.getGenerator());
+ docRenderingContext.getBasedir(), document, docRenderingContext.getGenerator());
Review Comment:
What happended to the rest?
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Allow to give alternative source directories for sites [maven-site-plugin]
Posted by "kwin (via GitHub)" <gi...@apache.org>.
kwin merged PR #1261:
URL: https://github.com/apache/maven-site-plugin/pull/1261
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org