Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

Invalid xml characters (0x0 for ex.) in *-testsute.xml break report #153

Closed
baev opened this issue Feb 19, 2014 · 4 comments
Closed

Invalid xml characters (0x0 for ex.) in *-testsute.xml break report #153

baev opened this issue Feb 19, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@baev
Copy link
Member

baev commented Feb 19, 2014

No description provided.

@baev baev added this to the 1.4 milestone Feb 19, 2014
@baev baev added the bug label Feb 19, 2014
@baev baev self-assigned this Feb 19, 2014
@baev baev mentioned this issue Feb 19, 2014
@lanwen
Copy link
Contributor

lanwen commented Mar 24, 2014

it will be nice to ignore this with warning, and dont fail site build

[INFO] Generating "Allure" report    --- allure-maven-plugin:1.3.2
Error on line 34 column 106 of 72fae53f-bb73-4ab1-b1ba-24b9d04f8969-testsuite.xml:
  SXXP0003: Error reported by XML parser: An invalid XML character (Unicode: 0x17) was found
  in the element content of the document.
Recoverable error on line 23 
  FODC0002: org.xml.sax.SAXParseException; systemId:
  file:/53300f3fe4b00fcb84262ae7/target/site/allure-maven-plugin/72fae53f-bb73-4ab1-b1ba-24b9d04f8969-testsuite.xml; lineNumber: 34; columnNumber: 106; An invalid XML character (Unicode: 0x17) was found in the element content of the document.
Error on line 72 column 106 of 9ff222fd-8def-4419-bca8-1237e9976ef8-testsuite.xml:
  SXXP0003: Error reported by XML parser: An invalid XML character (Unicode: 0x17) was found
  in the element content of the document.
Recoverable error on line 23 
  FODC0002: org.xml.sax.SAXParseException; systemId:
  file:/53300f3fe4b00fcb84262ae7/target/site/allure-maven-plugin/9ff222fd-8def-4419-bca8-1237e9976ef8-testsuite.xml; lineNumber: 72; columnNumber: 106; An invalid XML character (Unicode: 0x17) was found in the element content of the document.

@baev
Copy link
Member Author

baev commented Mar 24, 2014

надо заюзать JTidy перед построением отчета. Сделаю в ближайшей версии

@lanwen
Copy link
Contributor

lanwen commented Mar 24, 2014

Quick workaround:


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.15</version>
                <configuration>
                    <argLine>
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                    </argLine>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
                        </property>
                    </properties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>



            <plugin>
                <groupId>net.sourceforge.docbook-utils.maven-plugin</groupId>
                <artifactId>maven-tidy-plugin</artifactId>
                <version>1.0.0.beta-1</version>
                <executions>
                    <execution>
                        <id>clean-report-files</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>tidy</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceDir>${project.build.directory}/site/allure-maven-plugin</sourceDir>
                    <jtidyConfiguration>
                        <property>
                            <name>input-xml</name>
                            <value>true</value>
                        </property>
                        <property>
                            <name>output-xml</name>
                            <value>true</value>
                        </property>
                        <property>
                            <name>input-encoding</name>
                            <value>UTF-8</value>
                        </property>
                        <property>
                            <name>output-encoding</name>
                            <value>UTF-8</value>
                        </property>
                        <property>
                            <name>indent</name>
                            <value>true</value>
                        </property>
                    </jtidyConfiguration>
                </configuration>
            </plugin>

        </plugins>
    </build>



    <reporting>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>${allure.version}</version>
                <configuration>
                    <allureResultsDirectory>${project.build.directory}/tidy/</allureResultsDirectory>
                    <outputDirectory>${project.build.directory}/site/allure-maven-plugin</outputDirectory>
                </configuration>
            </plugin>

        </plugins>
    </reporting>

@baev
Copy link
Member Author

baev commented Apr 15, 2014

see #190

@baev baev closed this as completed Apr 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants