Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • J jruby-maven-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The TorqueBox Project
  • jruby-maven-plugins
  • Issues
  • #58
Closed
Open
Issue created Jul 30, 2014 by Administrator@rootContributor

Since jruby-maven-plugin-1.0.0 rspec-maven-plugin reports fail although rspec was succesfull

Created by: nikosn

Hi,

This was working until 1.0.0-rc4.

Example output with 1.0.4:

....
[INFO] Web
[INFO]   Web
[INFO]     GET /
[INFO]   Web
[INFO]       GET /
[INFO]         returns 'hello world' - 0.472s
[INFO]       returns 'hello world'
[INFO] ------------------------------------------------------------------------
[INFO] Completed in 395.158s 
[INFO] ------------------------------------------------------------------------
[INFO] Passing...166
[INFO] Pending...0
[INFO] Failing...0
[INFO] 
[INFO] Total.....166
[INFO] ------------------------------------------------------------------------
....

Backtrace:

[ERROR] Failed to execute goal de.saumya.mojo:rspec-maven-plugin:1.0.4:test (run ruby tests) on project test: There were test failures -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.saumya.mojo:rspec-maven-plugin:1.0.4:test (run ruby tests) on project test: There were test failures
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        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:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
        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:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: There were test failures
        at de.saumya.mojo.tests.AbstractTestMojo.executeWithGems(AbstractTestMojo.java:217)
        at de.saumya.mojo.gem.AbstractGemMojo.executeJRuby(AbstractGemMojo.java:467)
        at de.saumya.mojo.jruby.AbstractJRubyMojo.execute(AbstractJRubyMojo.java:295)
        at de.saumya.mojo.gem.AbstractGemMojo.execute(AbstractGemMojo.java:222)
        at de.saumya.mojo.rspec.RSpecMojo.execute(RSpecMojo.java:88)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more

It seems the boolean var failure in AbstractTestMojo is set to true after the script run and the exception is thrown

if(failure){
            throw new MojoExecutionException("There were test failures");
}

, but I do not understand the reason for.

Thanks

Assignee
Assign to
Time tracking