Maven Doxia

Spurious <?xml version="1.0" encoding="UTF-8"?> in generated <head> section

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0-alpha-8
  • Fix Version/s: 1.0-alpha-9
  • Component/s: None
  • Labels:
    None
  • Environment:
    Linux, java version "1.4.2-02"
  • Number of attachments :
    0

Description

The string "<?xml version="1.0" encoding="UTF-8"?>" appears before each element of the project.body.head tag of the site.xml file. Example follows.

<-- pom.xml -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.hello</groupId>
<artifactId>hello</artifactId>
<version>1.0</version>
<name>Hello</name>
</project>

<-- src/site/site.xml -->

<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Hello">
<body>
<head>
<link href="favicon.ico" rel="SHORTCUT ICON" />
</head>
<menu ref="reports" />
</body>
</project>

<-- index.html generated by 'mvn site' -->

<html>
<head>
<title>Hello - About</title>
...
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<?xml version="1.0" encoding="UTF-8"?>
<link href="favicon.ico" rel="SHORTCUT ICON"></link>

</head>
<body class="composite">
...

Issue Links

Activity

Hide
Lukas Theussl added a comment -

A <head> element is not allowed in site.xml.

Show
Lukas Theussl added a comment - A <head> element is not allowed in site.xml.
Hide
lacton added a comment -

Lukas,

Thank you for your comment. What is the right place to put a favicon tag (i.e., <link href="favicon.ico" rel="SHORTCUT ICON" />) in that case?

Cheers.

Show
lacton added a comment - Lukas, Thank you for your comment. What is the right place to put a favicon tag (i.e., <link href="favicon.ico" rel="SHORTCUT ICON" />) in that case? Cheers.
Hide
Lukas Theussl added a comment -

In m1 you could add <head> elements to your xdoc sources, (see eg http://maven.apache.org/maven-1.x/using/site.html#Creating_a_new_Document), but that doesn't seem to work in m2. That's probably a doxia bug or missing feature, need to check. In any case, apt doesn't know a head element.

Show
Lukas Theussl added a comment - In m1 you could add <head> elements to your xdoc sources, (see eg http://maven.apache.org/maven-1.x/using/site.html#Creating_a_new_Document), but that doesn't seem to work in m2. That's probably a doxia bug or missing feature, need to check. In any case, apt doesn't know a head element.
Hide
lacton added a comment -

I see. Does it mean that this issue should not be for the Site Plugin but for Doxia?

Show
lacton added a comment - I see. Does it mean that this issue should not be for the Site Plugin but for Doxia?
Hide
Vincent Siveton added a comment -

Added a small workaround to handle the non-desired behaviour in p-u.

Show
Vincent Siveton added a comment - Added a small workaround to handle the non-desired behaviour in p-u.
Hide
Lukas Theussl added a comment -

Just for reference, the <head> element is allowed in site.xml, see http://www.nabble.com/head-element-in-site.xml--tf4396612s177.html

Show
Lukas Theussl added a comment - Just for reference, the <head> element is allowed in site.xml, see http://www.nabble.com/head-element-in-site.xml--tf4396612s177.html

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: