michael-o commented on a change in pull request #24:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/24#discussion_r790304486



##########
File path: 
doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
##########
@@ -401,43 +401,6 @@ File getSiteDescriptorFromRepository( MavenProject 
project, ArtifactRepository l
         }
     }
 
-    /**
-     * Read site descriptor content from Reader, adding support for deprecated 
<code>${reports}</code>,
-     * <code>${parentProject}</code> and <code>${modules}</code> tags.
-     *
-     * @param reader
-     * @return the input content interpolated with deprecated tags
-     * @throws IOException
-     */
-    private String readSiteDescriptor( Reader reader, String projectId )
-        throws IOException
-    {
-        String siteDescriptorContent = IOUtil.toString( reader );
-
-        // This is to support the deprecated ${reports}, ${parentProject} and 
${modules} tags.
-        Properties props = new Properties();
-        props.put( "reports", "<menu ref=\"reports\"/>" );
-        props.put( "modules", "<menu ref=\"modules\"/>" );
-        props.put( "parentProject", "<menu ref=\"parent\"/>" );
-
-        // warn if interpolation required
-        for ( Object prop : props.keySet() )
-        {
-            if ( siteDescriptorContent.contains( "$" + prop ) )
-            {
-                LOGGER.warn( "Site descriptor for " + projectId + " contains 
$" + prop
-                    + ": should be replaced with " + props.getProperty( 
(String) prop ) );
-            }
-            if ( siteDescriptorContent.contains( "${" + prop + "}" ) )
-            {
-                LOGGER.warn( "Site descriptor for " + projectId + " contains 
${" + prop
-                    + "}: should be replaced with " + props.getProperty( 
(String) prop ) );
-            }

Review comment:
       It will not ignore or silently fail. The XML parser will throw a regular 
exception since the input does not correspond to the schema w/o interpolation. 
I had this because I did not modify the UTs in the first place.
   I think it is right to rely on the XML parser since this feature is 
deprecated which mean it will be removed and not handled explicitly any more in 
a future warning.




-- 
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-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to