ascheman commented on code in PR #1287:
URL:
https://github.com/apache/maven-site-plugin/pull/1287#discussion_r3636530515
##########
src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java:
##########
@@ -296,6 +296,20 @@ protected SiteRenderingContext
createSiteRenderingContext(Locale locale)
templateProperties.putAll(attributes);
}
+ if (siteModel.getSkin() == null) {
+ File siteDescriptor = new File(siteDirectory, "site.xml");
+ throw new MojoExecutionException("No skin is declared in the site
descriptor. Since the site descriptor"
+ + " 2.0.0 no longer provides a default skin, a skin must
be declared explicitly, for example in "
+ + siteDescriptor + ":" + System.lineSeparator()
+ + " <skin>" + System.lineSeparator()
+ + " <groupId>org.apache.maven.skins</groupId>" +
System.lineSeparator()
+ + " <artifactId>maven-fluido-skin</artifactId>" +
System.lineSeparator()
+ + " <version>...</version>" + System.lineSeparator()
+ + " </skin>" + System.lineSeparator()
+ + "The skin is normally inherited from the Maven parent's
site descriptor; check that the parent"
+ + " site descriptor is resolvable if you expected it to be
inherited.");
+ }
Review Comment:
Agreed — changed to `MojoFailureException` in ac1f66fb (the method already
declares it); a missing skin is a project-configuration problem, so a build
failure is the right classification.
##########
src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java:
##########
@@ -296,6 +296,20 @@ protected SiteRenderingContext
createSiteRenderingContext(Locale locale)
templateProperties.putAll(attributes);
}
+ if (siteModel.getSkin() == null) {
+ File siteDescriptor = new File(siteDirectory, "site.xml");
+ throw new MojoExecutionException("No skin is declared in the site
descriptor. Since the site descriptor"
+ + " 2.0.0 no longer provides a default skin, a skin must
be declared explicitly, for example in "
+ + siteDescriptor + ":" + System.lineSeparator()
Review Comment:
Done in ac1f66fb — dropped the version number; the message now reads "the
site descriptor no longer provides a default skin", keeping the context without
coupling to a specific model version.
--
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]