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



##########
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:
       @hboutemy this happens when the expressions aren't removed:
   ```
   [INFO] Running org.apache.maven.doxia.tools.DefaultSiteToolTest
   [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.13 
s - in org.apache.maven.doxia.tools.DefaultSiteToolTest
   [INFO] Running org.apache.maven.doxia.tools.SiteToolTest
   [INFO] artifact org.apache.maven.skins:maven-stylus-skin: checking for 
updates from central
   [INFO] Unable to find resource 'org.apache.maven:maven-site:xml:site_en:1.0' 
in repository central (https://repo1.maven.org/maven2)
   [ERROR] Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
1.74 s <<< FAILURE! - in org.apache.maven.doxia.tools.SiteToolTest
   [ERROR] testGetDecorationModel(org.apache.maven.doxia.tools.SiteToolTest)  
Time elapsed: 0.078 s  <<< ERROR!
   org.apache.maven.doxia.tools.SiteToolException: Error parsing site descriptor
           at 
org.apache.maven.doxia.tools.SiteToolTest.testGetDecorationModel(SiteToolTest.java:249)
   Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: 
expected START_TAG or END_TAG not TEXT (position: TEXT seen ...em name="Test" 
href="/test.html"/>\n    </menu>\n    ${reports}\n  </... @44:5)
           at 
org.apache.maven.doxia.tools.SiteToolTest.testGetDecorationModel(SiteToolTest.java:249)
    ```




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