You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/23 17:04:55 UTC

[GitHub] [maven-doxia-sitetools] hboutemy commented on a change in pull request #24: [DOXIASITETOOLS-156] Fail if deprecated ${reports}, ${parentProject} …

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



##########
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:
       instead of silently failing, wouldn't it make sense to make a clear failure?




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

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