michael-o commented on code in PR #610:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/610#discussion_r2747149239


##########
doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java:
##########
@@ -862,6 +870,37 @@ public void copyResources(SiteRenderingContext 
siteRenderingContext, File output
         }
     }
 
+    private boolean isResourceRelevant(String name, Context velocityContext, 
Map<String, String> resourceConditions) {
+        if (resourceConditions == null || 
!resourceConditions.containsKey(name)) {
+            LOGGER.debug("No condition for resource: " + name);
+        } else {
+            String condition = resourceConditions.get(name);
+            LOGGER.debug("Evaluating condition for resource: " + name + " with 
condition: " + condition);
+            StringWriter writer = new StringWriter();
+            Velocity.evaluate(velocityContext, writer, 
"conditional-resource-evaluation", condition);
+            String result = writer.toString().trim();
+            LOGGER.debug("Condition evaluation result: " + result);
+            if (!Boolean.parseBoolean(result)) {
+                LOGGER.debug("Excluding resource: " + name);
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private Map<String, String> createResourceConditionsMap(SkinModel 
skinModel) {
+        Map<String, String> resourceConditions = new HashMap<>();
+        if (skinModel != null && skinModel.getResourceConditions() != null) {

Review Comment:
   Then remove it, we know it is always there.



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