Copilot commented on code in PR #1287:
URL: 
https://github.com/apache/maven-site-plugin/pull/1287#discussion_r3628243009


##########
src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java:
##########
@@ -296,6 +296,19 @@ protected SiteRenderingContext 
createSiteRenderingContext(Locale locale)
             templateProperties.putAll(attributes);
         }
 
+        if (siteModel.getSkin() == null) {
+            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"
+                    + " src/site/site.xml:" + 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:
   The new error message hard-codes `src/site/site.xml`, but `siteDirectory` is 
a configurable parameter (defaulting to `${basedir}/src/site`). If a user has 
configured a different site directory, the guidance will point them at the 
wrong file path. Consider using `siteDirectory` (or `new File(siteDirectory, 
"site.xml")`) in the message so it stays accurate for all configurations.



-- 
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