Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16990

unable to resolve class hudson.maven.reporters.SurefireAggregatedReport in groovy template

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      1. Edit a groovy template and add a reference to hudson.maven.reporters.SurefireAggregatedReport.

      2. Test the template using the testing instructions on the wiki at https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin#Email-extplugin-TestingTemplates

      EXPECTING: email is sent.

      ACTUAL: Exception: javax.script.ScriptException: groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript52.groovy: 121: unable to resolve class hudson.maven.reporters.SurefireAggregatedReport @ line 121, column 1. import hudson.maven.reporters.SurefireAggregatedReport ^ SimpleTemplateScript52.groovy: 128:

      This prevents someone from displaying the JUnit test results. Basically, I'm trying to copy and then modify ScriptContentBuildWrapper.getJUnitTestResult() as a starting point.

      If I try to access ScriptContentBuildWrapper, I get this error -

      Exception: javax.script.ScriptException: groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript58.groovy: 136: unable to resolve class hudson.plugins.emailext.plugins.content.ScriptContentBuildWrapper @ line 136, column 1. import hudson.plugins.emailext.plugins.content.ScriptContentBuildWrapper ^ 1 error

        Attachments

          Issue Links

            Activity

            Hide
            joshunger Josh Unger added a comment -

            Thanks, I was going to ask... how one might use Joda Time...

            Show
            joshunger Josh Unger added a comment - Thanks, I was going to ask... how one might use Joda Time...
            Hide
            slide_o_mix Alex Earl added a comment -

            No idea

            Show
            slide_o_mix Alex Earl added a comment - No idea
            Hide
            slide_o_mix Alex Earl added a comment -

            I've been toying with the idea of making sure grape works, but haven't gotten very far.

            http://groovy.codehaus.org/Grape

            Show
            slide_o_mix Alex Earl added a comment - I've been toying with the idea of making sure grape works, but haven't gotten very far. http://groovy.codehaus.org/Grape
            Hide
            slide_o_mix Alex Earl added a comment -

            Instead of importing, can you try using the full class name later in your script?

            Show
            slide_o_mix Alex Earl added a comment - Instead of importing, can you try using the full class name later in your script?
            Hide
            slide_o_mix Alex Earl added a comment -

            Set the class loader for the SimpleTemplateEngine.

            Show
            slide_o_mix Alex Earl added a comment - Set the class loader for the SimpleTemplateEngine.

              People

              • Assignee:
                slide_o_mix Alex Earl
                Reporter:
                joshunger Josh Unger
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: