kwin commented on code in PR #630:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/630#discussion_r3014603683


##########
doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java:
##########
@@ -477,6 +517,29 @@ public Object execute(String expression, Object value) {
         }
     }
 
+    /**
+     * Merge properties from different sources in the following order (with 
later sources overriding earlier ones):
+     * <ol>
+     *    <li>System properties from the Maven execution request</li>
+     *    <li>Project properties from the Maven project</li>
+     *    <li>User properties from the Maven execution request</li>
+     * </ol>
+     * @param request
+     * @param aProject
+     * @return
+     */
+    private static Properties mergeProperties(MavenExecutionRequest request, 
MavenProject aProject) {
+        Properties merged = new Properties();
+        if (request != null) {
+            merged.putAll(request.getSystemProperties());
+        }
+        merged.putAll(aProject.getProperties());
+        if (request != null) {
+            merged.putAll(request.getUserProperties());

Review Comment:
   Removed in 
https://github.com/apache/maven-doxia-sitetools/pull/630/commits/a0dfbaf67957e6f4033d0bfcad6bf35137a8f884.



##########
doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java:
##########
@@ -129,6 +134,32 @@ SiteModel getSiteModel(
             List<RemoteRepository> remoteProjectRepositories)
             throws SiteToolException;
 
+    /**
+     * Get a site model for a project.
+     *
+     * @param siteDirectory the site directory, may be null if project from 
repository
+     * @param locale the locale used for the i18n in SiteModel, not null.
+     * See {@link #getSiteDescriptor(File, Locale)} for details.
+     * @param project the Maven project, not null.
+     * @param request the Maven execution request (not null). This is needed 
to get the user properties and the system properties for interpolation.

Review Comment:
   Done in 
https://github.com/apache/maven-doxia-sitetools/pull/630/commits/a0dfbaf67957e6f4033d0bfcad6bf35137a8f884.



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