Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-670

Cannot use site.xml generated by effective-site goal and output parameter as is

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.2
    • 3.3
    • site descriptor
    • None

    Description

      When no site descriptor file exists in the project,
      executing the effective-site goal and the site goal in order like below fails.
      >mvn -Doutput=src/site/site.xml site:effective-site
      >mvn site:site

      Error:
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.2:site (default-cli) on project maven-exercise: SiteToolException: Error parsing site descriptor: processing instruction can not have PITarget with reserveld xml name (position: START_DOCUMENT seen ...==================================================== -->\r\n\r\n<?xml ... @16:7) -> [Help 1]

      The contents of site.xml generated by effective-site goal:

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- ====================================================================== -->
      <!--                                                                        -->
      <!-- Generated by Maven Site Plugin on 2012-12-12T12:46:21                  -->
      <!-- See: http://maven.apache.org/plugins/maven-site-plugin/                -->
      <!--                                                                        -->
      <!-- ====================================================================== -->
      
      <!-- ====================================================================== -->
      <!--                                                                        -->
      <!-- Effective site descriptor for project                                  -->
      <!-- 'com.newmainsoftech:maven-exercise:jar:1.0-SNAPSHOT'                   -->
      <!--                                                                        -->
      <!-- ====================================================================== -->
      
      <?xml version="1.0" encoding="UTF-8"?>
      <project xsi:schemaLocation="http://maven.apache.org/DECORATION/1.3.0 http://maven.apache.org/xsd/decoration-1.3.0.xsd" name="maven-exercise" xmlns="http://maven.apache.org/DECORATION/1.3.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <bannerLeft>
          <name>maven-exercise</name>
        </bannerLeft>
        <body>
          <links>
            <item name="maven-exercise" href="./" />
          </links>
          <menu ref="parent" />
          <menu ref="reports" />
        </body>
      </project>

      When no site descriptor file exists, could you make the generated contents by the effective-site goal with the output parameter valid as a site descriptor file, so that the site goal works without removing duplicate XML declaration and the comments manually from it first?

      Attachments

        Activity

          People

            hboutemy Herve Boutemy
            arty Arata
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: