You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/12/22 09:16:00 UTC

[jira] [Comment Edited] (DOXIASITETOOLS-227) Throwing "new ParseException(message)" shows message with "line [-1]"

    [ https://issues.apache.org/jira/browse/DOXIASITETOOLS-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17463620#comment-17463620 ] 

Michael Osipov edited comment on DOXIASITETOOLS-227 at 12/22/21, 9:15 AM:
--------------------------------------------------------------------------

Thanks a lot!
Already validated, I am overriding the dependencies manually like. But I wonder, is this something we can openly suggest to users of our doxia module? Or just a "run at your own risk" workaround?

{code;xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.9.1</version>
    <configuration>
        <generateReports>true</generateReports>
        <generateSitemap>true</generateSitemap>
        <relativizeDecorationLinks>false</relativizeDecorationLinks>
        <locales>en</locales>
        <inputEncoding>UTF-8</inputEncoding>
        <outputEncoding>UTF-8</outputEncoding>
        <asciidoc>
            <attributes>
                <icons>font</icons>
                <source-highlighter>coderay</source-highlighter>
                <coderay-css>style</coderay-css>
                <toclevels>2</toclevels>
            </attributes>
        </asciidoc>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>${asciidoctor.maven.plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-site-renderer</artifactId>
            <version>1.11.2-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-core</artifactId>
            <version>1.11.1</version>
        </dependency>
    </dependencies>
</plugin>
{code}


was (Author: abel s.romero):
Thanks a lot!
Already validated, I am overriding the dependencies manually like. But I wonder, is this something we can openly suggest to users of our doxia module? Or just a "run at your own risk" workaround?

{code;xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.9.1</version>
    <configuration>
        <generateReports>true</generateReports>
        <generateSitemap>true</generateSitemap>
        <relativizeDecorationLinks>false</relativizeDecorationLinks>
        <locales>en</locales>
        <inputEncoding>UTF-8</inputEncoding>
        <outputEncoding>UTF-8</outputEncoding>
        <asciidoc>
            <attributes>
                <icons>font</icons>
                <source-highlighter>coderay</source-highlighter>
                <coderay-css>style</coderay-css>
                <toclevels>2</toclevels>
            </attributes>
        </asciidoc>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>${asciidoctor.maven.plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-site-renderer</artifactId>
            <version>1.11.2-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-core</artifactId>
            <version>1.11.1</version>
        </dependency>
    </dependencies>
</plugin>
{code}

> Throwing "new ParseException(message)" shows message with "line [-1]"
> ---------------------------------------------------------------------
>
>                 Key: DOXIASITETOOLS-227
>                 URL: https://issues.apache.org/jira/browse/DOXIASITETOOLS-227
>             Project: Maven Doxia Sitetools
>          Issue Type: Bug
>          Components: Site renderer
>    Affects Versions: 1.9.1
>            Reporter: Abel Salgado Romero
>            Assignee: Michael Osipov
>            Priority: Minor
>              Labels: intern
>             Fix For: 1.10
>
>
> When throwing a 'org.apache.maven.doxia.parser.ParseException' from a Doxia module indicating only a message or source exception a message pointing to line -1 is show in console.
> Exemple:
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7.1:site (default-cli) on project asciidoc-maven-site-example: Error parsing '/home/asalgadr/github/asciidoctor-maven-examples/asciidoc-maven-site-example/src/site/asciidoc/article.adoc': line [-1] Found 1 issue(s) of severity DEBUG or higher during rendering -> [Help 1]
>  
> I would expect that in case the line is not initialized, no reference to it is shown in the console.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)