sijpesteijn / mafia-maven-plugin

FitNesse plugin for maven
19 stars 9 forks source link

mafia:report produces a Parser Exception: org/apache/maven/doxia/siterenderer/resources/default-site.vm #18

Closed phauer closed 8 years ago

phauer commented 9 years ago

Hello,

Steps to reproduce the issue: 1) create an empty maven project 2) add this pom:

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>mygroup</groupId>
    <artifactId>mafiaplayground</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <properties>
        <version.mafia>2.1.5</version.mafia>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>nl.sijpesteijn.testing.fitnesse.plugins</groupId>
                <artifactId>mafia-maven-plugin</artifactId>
                <version>${version.mafia}</version>
            </plugin>
        </plugins>
    </build>
</project>

3) mvn mafia:content mafia:start 4) execute the default test http://localhost:9090/FitNesse.UserGuide.TwoMinuteExample?test 5) mvn mafia:report produces the following output:

[INFO] --- mafia-maven-plugin:2.1.5:report (default-cli) @ mafiaplayground ---
[ERROR] Parser Exception: org/apache/maven/doxia/siterenderer/resources/default-site.vm
[ERROR] org.apache.velocity.runtime.parser.ParseException: Encountered "1.0" at line 308, column 51.
Was expecting one of:
    <RPAREN> ...
    <WHITESPACE> ...
    "-" ...
    "+" ...
    "*" ...
    "/" ...
    "%" ...
    <LOGICAL_AND> ...
    <LOGICAL_OR> ...
    <LOGICAL_LT> ...
    <LOGICAL_LE> ...
    <LOGICAL_GT> ...
    <LOGICAL_GE> ...
    <LOGICAL_EQUALS> ...
    <LOGICAL_NOT_EQUALS> ...

    at org.apache.velocity.runtime.parser.Parser.generateParseException(Parser.java:3679)
    at org.apache.velocity.runtime.parser.Parser.jj_consume_token(Parser.java:3558)
    at org.apache.velocity.runtime.parser.Parser.SetDirective(Parser.java:1972)
    at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:369)
    at org.apache.velocity.runtime.parser.Parser.Directive(Parser.java:918)
    at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:379)
    at org.apache.velocity.runtime.parser.Parser.IfStatement(Parser.java:1692)
    at org.apache.velocity.runtime.parser.Parser.Statement(Parser.java:352)
    at org.apache.velocity.runtime.parser.Parser.process(Parser.java:317)
    at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:117)
    at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1226)
    at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1181)
    at org.apache.velocity.Template.process(Template.java:134)
    at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:437)
    at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
    at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
    at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
    at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:373)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.processTemplate(DefaultSiteRenderer.java:533)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.writeTemplate(DefaultSiteRenderer.java:508)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.generateDocument(DefaultSiteRenderer.java:485)
    at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:97)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

[ERROR] ResourceManager.getResource() parse exception
[ERROR] org.apache.velocity.exception.ParseErrorException: Encountered "1.0" at org/apache/maven/doxia/siterenderer/resources/default-site.vm[line 308, column 51]
Was expecting one of:
    <RPAREN> ...
    <WHITESPACE> ...
    "-" ...
    "+" ...
    "*" ...
    "/" ...
    "%" ...
    <LOGICAL_AND> ...
    <LOGICAL_OR> ...
    <LOGICAL_LT> ...
    <LOGICAL_LE> ...
    <LOGICAL_GT> ...
    <LOGICAL_GE> ...
    <LOGICAL_EQUALS> ...
    <LOGICAL_NOT_EQUALS> ...

    at org.apache.velocity.Template.process(Template.java:151)
    at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:437)
    at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
    at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
    at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
    at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:373)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.processTemplate(DefaultSiteRenderer.java:533)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.writeTemplate(DefaultSiteRenderer.java:508)
    at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.generateDocument(DefaultSiteRenderer.java:485)
    at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:97)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.894s
[INFO] Finished at: Tue Mar 31 14:55:08 CEST 2015
[INFO] Final Memory: 13M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal nl.sijpesteijn.testing.fitnesse.plugins:mafia-maven-plugin:2.1.5:report (default-cli) on project mafiaplayground: An error has occurred in FitNesse test results report generation. Could not find the template 'org/apache/maven/doxia/siterenderer/resources/default-site.vm -> [Help 1]

It seems to me that the included doxia version version (1.0) contains an invalid velocity template.

Not sure, if this is really a bug, but it seems to be.

Best Regards Philipp

sijpesteijn commented 9 years ago

Hi Philipp,

I will look into it. Also the other issue you reported. I'm pretty busy at the moment, but I hope I can give you a solution this week.

Cheers, Gijs

sijpesteijn commented 8 years ago

Hi Philipp,

Sorry it took so long to respond, but recently I've updated the plugin. When you use the goal site:site and have the report tags in your pom, the plugin will create a maven site report. As input it uses the report default created by the mafia plugin. After each test run, the mafia plugin will create a fitness_report.html in FitNesseRoot/files/mafiaResults/report/. You can als publish this report directly. mafia:report is not meant for direct use. I will update the documentation to explain the workings.

Cheers, Gijs