I recently embarked on installing a sample project for cucumber and tried running it with maven + java.
I followed this guide
http://www.goodercode.com/wp/using-cucumber-tests-with-maven-and-java/
First issue was when I run mvn cuke4duke:cucumber -DinstallGems=true I was getting an issue running gem command from the jruby-complete-1.5.6 jar
I installed JRuby1.5.6 and installed the cuke4duke gem myself to the maven repository.
Now when I run the command above I get an error in the script file "require 'rubygem'" and it cannot execute the gem command again.
I am running on xp and tried this with maven 2.0.9 and maven 3.0.2 (fresh install)
I have tried running java -classpath "all the libs in trace" org.Main gem install cuke4duke .... (see trace for the full command) and this does not work. To install the gems I used the JRuby installer and did the same command it worked fine.
How can it be so difficult to run cucumber on windows with java. I have tried several variations and just don't know what to do next.
Here is my stack trace with running mvn cuke4duke:cucumber -DinstallGems=true
Apache Maven 3.0.2 (r1056850; 2011-01-09 00:58:10+0000)
Java version: 1.6.0_21, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_21\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\local\apache-maven-3.0.2\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Documents and Settings\Ronald.Noble\.m2\settings.xml
[DEBUG] Using local repository at C:\Documents and Settings\Ronald.Noble\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Documents and Settings\Ronald.Noble\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.goodercode:maven-cuke:jar:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[DEBUG] Resolving plugin prefix cuke4duke from [com.atlassian.maven.plugins, org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Resolved plugin prefix cuke4duke to cuke4duke:cuke4duke-maven-plugin from POM com.goodercode:maven-cuke:jar:1.0-SNAPSHOT
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.goodercode:maven-cuke:jar:1.0-SNAPSHOT
[DEBUG] Tasks: [cuke4duke:cucumber]
[DEBUG] Style: Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-cuke 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Resolving plugin prefix cuke4duke from [com.atlassian.maven.plugins, org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Resolved plugin prefix cuke4duke to cuke4duke:cuke4duke-maven-plugin from POM com.goodercode:maven-cuke:jar:1.0-SNAPSHOT
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project: com.goodercode:maven-cuke:1.0-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [test]
[DEBUG] Repositories (dependencies): [icdinhouse (http://ukicdjira/repository/inhouse/, releases=true, snapshots=true, managed=false), icdsnapshots (http://ukicdjira/repository/snapshots/, releases=true, snapshots=true, managed=false), mavenSnapshots (http://people.apache.org/maven-snapshot-repository/, releases=true, snapshots=true, managed=false), nexus (http://nexus.openqa.org/content/repositories/releases/, releases=true, snapshots=true, managed=false), nexussnapshots (http://nexus.openqa.org/content/repositories/releases/, releases=true, snapshots=true, managed=false), spring-maven-release (http://maven.springframework.org/release, releases=true, snapshots=true, managed=false), spring-maven-milestone (http://maven.springframework.org/milestone, releases=true, snapshots=true, managed=false), spring-roo-repository (http://spring-roo-repository.springsource.org/release, releases=true, snapshots=true, managed=false), JBoss Repo (https://repository.jboss.org/nexus/content/repositories/releases, releases=true, snapshots=true, managed=false), codehaus (http://repository.codehaus.org, releases=true, snapshots=true, managed=false), cukes (http://cukes.info/maven, releases=true, snapshots=true, managed=false), central (http://repo1.maven.org/maven2, releases=true, snapshots=false, managed=false)]
[DEBUG] Repositories (plugins) : [cukes (http://cukes.info/maven, releases=true, snapshots=true, managed=false), atlassian-m2-repository (http://repository.atlassian.com/maven2, releases=true, snapshots=true, managed=false), central (http://repo1.maven.org/maven2, releases=true, snapshots=false, managed=false)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: cuke4duke:cuke4duke-maven-plugin:0.4.3:cucumber (default-cli)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<compileClasspathElements default-value="${project.compileClasspathElements}"/>
<cucumberArgs>
<cucumberArg>C:\workspace\maven-cuke/target/test-classes --tags ~@wip</cucumberArg>
</cucumberArgs>
<extraCucumberArgs>${cucumber.extraArgs}</extraCucumberArgs>
<failOnError>${cucumber.failOnError}</failOnError>
<features>${cucumber.features}</features>
<gemDirectory>${cucumber.gemDirectory}</gemDirectory>
<gems>
<gem>install cuke4duke --version 0.4.3</gem>
</gems>
<installGems>${cucumber.installGems}</installGems>
<jvmArgs>
<jvmArg>-Dcuke4duke.objectFactory=cuke4duke.internal.jvmclass.PicoFactory</jvmArg>
<jvmArg>${cucumber.debug}</jvmArg>
</jvmArgs>
<launchDirectory>${project.basedir}</launchDirectory>
<localRepository>${localRepository}</localRepository>
<mavenProject>${project}</mavenProject>
<pluginArtifacts>${plugin.artifacts}</pluginArtifacts>
<settings>${settings}</settings>
<skip>${maven.test.skip}</skip>
<testClasspathElements>${project.testClasspathElements}</testClasspathElements>
</configuration>
[DEBUG] =======================================================================
[DEBUG] com.goodercode:maven-cuke:jar:1.0-SNAPSHOT
[DEBUG] cuke4duke:cuke4duke:jar:0.4.3:test
[DEBUG] org.jruby:jruby-complete:jar:1.5.6:test
[DEBUG] org.apache.ant:ant:jar:1.8.2:test
[DEBUG] org.apache.ant:ant-launcher:jar:1.8.2:test
[DEBUG] org.picocontainer:picocontainer:jar:2.8.3:test
[DEBUG] junit:junit:jar:4.8.1:test
[INFO]
[INFO] --- cuke4duke-maven-plugin:0.4.3:cucumber (default-cli) @ maven-cuke ---
[DEBUG] cuke4duke:cuke4duke-maven-plugin:jar:0.4.3:
[DEBUG] org.apache.maven:maven-project:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-settings:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-model:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.9:compile
[DEBUG] org.apache.maven:maven-plugin-registry:jar:2.0.9:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.5.1:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.9:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG] junit:junit:jar:4.8.2:compile (version managed from 3.8.1)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.9:compile
[DEBUG] cuke4duke:cuke4duke:jar:0.4.3:compile
[DEBUG] org.jruby:jruby-complete:jar:1.5.6:compile
[DEBUG] org.apache.ant:ant:jar:1.8.2:compile
[DEBUG] org.apache.ant:ant-launcher:jar:1.8.2:compile
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG] Imported: org.sonatype.aether.transfer < plexus.core
[DEBUG] Imported: org.apache.maven.exception < plexus.core
[DEBUG] Imported: org.sonatype.aether.metadata < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG] Imported: org.sonatype.aether.collection < plexus.core
[DEBUG] Imported: org.sonatype.aether.version < plexus.core
[DEBUG] Imported: org.apache.maven.monitor < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG] Imported: org.apache.maven.repository < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG] Imported: org.apache.maven.profiles < plexus.core
[DEBUG] Imported: org.sonatype.aether.repository < plexus.core
[DEBUG] Imported: org.apache.maven.classrealm < plexus.core
[DEBUG] Imported: org.apache.maven.execution < plexus.core
[DEBUG] Imported: org.sonatype.aether.artifact < plexus.core
[DEBUG] Imported: org.sonatype.aether.spi < plexus.core
[DEBUG] Imported: org.apache.maven.reporting < plexus.core
[DEBUG] Imported: org.apache.maven.usability < plexus.core
[DEBUG] Imported: org.codehaus.plexus.container < plexus.core
[DEBUG] Imported: org.codehaus.plexus.component < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG] Imported: org.sonatype.aether.graph < plexus.core
[DEBUG] Imported: org.sonatype.aether.* < plexus.core
[DEBUG] Imported: org.apache.maven.settings < plexus.core
[DEBUG] Imported: org.codehaus.classworlds < plexus.core
[DEBUG] Imported: org.sonatype.aether.impl < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG] Imported: org.apache.maven.toolchain < plexus.core
[DEBUG] Imported: org.sonatype.aether.deployment < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG] Imported: org.apache.maven.configuration < plexus.core
[DEBUG] Imported: org.apache.maven.cli < plexus.core
[DEBUG] Imported: org.sonatype.aether.installation < plexus.core
[DEBUG] Imported: org.codehaus.plexus.context < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG] Imported: org.apache.maven.project < plexus.core
[DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG] Imported: org.apache.maven.artifact < plexus.core
[DEBUG] Imported: org.apache.maven.model < plexus.core
[DEBUG] Imported: org.apache.maven.* < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG] Imported: org.sonatype.aether.resolution < plexus.core
[DEBUG] Imported: org.apache.maven.plugin < plexus.core
[DEBUG] Imported: org.codehaus.plexus.* < plexus.core
[DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG] Populating class realm maven.api
[DEBUG] Created new class realm plugin>cuke4duke:cuke4duke-maven-plugin:0.4.3
[DEBUG] Importing foreign packages into class realm plugin>cuke4duke:cuke4duke-maven-plugin:0.4.3
[DEBUG] Imported: < maven.api
[DEBUG] Populating class realm plugin>cuke4duke:cuke4duke-maven-plugin:0.4.3
[DEBUG] Included: cuke4duke:cuke4duke-maven-plugin:jar:0.4.3
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.5.1
[DEBUG] Included: junit:junit:jar:4.8.2
[DEBUG] Included: cuke4duke:cuke4duke:jar:0.4.3
[DEBUG] Included: org.jruby:jruby-complete:jar:1.5.6
[DEBUG] Included: org.apache.ant:ant:jar:1.8.2
[DEBUG] Included: org.apache.ant:ant-launcher:jar:1.8.2
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-settings:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0.9
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9
[DEBUG] Configuring mojo cuke4duke:cuke4duke-maven-plugin:0.4.3:cucumber from plugin realm ClassRealm[plugin>cuke4duke:cuke4duke-maven-plugin:0.4.3, parent: sun.misc.Launcher$AppClassLoader@11b86e7]
[DEBUG] Configuring mojo 'cuke4duke:cuke4duke-maven-plugin:0.4.3:cucumber' with basic configurator -->
[DEBUG] (f) compileClasspathElements = [C:\workspace\maven-cuke\target\classes]
[DEBUG] (f) cucumberArgs = [C:\workspace\maven-cuke/target/test-classes --tags ~@wip]
[DEBUG] (f) gems = [install cuke4duke --version 0.4.3]
[DEBUG] (f) jvmArgs = [-Dcuke4duke.objectFactory=cuke4duke.internal.jvmclass.PicoFactory, null]
[DEBUG] (f) launchDirectory = C:\workspace\maven-cuke
[DEBUG] (f) localRepository = id: local
url: file:///C:/Documents%20and%20Settings/Ronald.Noble/.m2/repository/
layout: none
[DEBUG] (f) mavenProject = MavenProject: com.goodercode:maven-cuke:1.0-SNAPSHOT @ C:\workspace\maven-cuke\pom.xml
[DEBUG] (f) pluginArtifacts = [cuke4duke:cuke4duke-maven-plugin:maven-plugin:0.4.3:, org.codehaus.plexus:plexus-utils:jar:1.5.1:compile, junit:junit:jar:4.8.2:compile, cuke4duke:cuke4duke:jar:0.4.3:compile, org.jruby:jruby-complete:jar:1.5.6:compile, org.apache.ant:ant:jar:1.8.2:compile, org.apache.ant:ant-launcher:jar:1.8.2:compile]
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter@b51404
[DEBUG] (f) testClasspathElements = [C:\workspace\maven-cuke\target\test-classes, C:\workspace\maven-cuke\target\classes, C:\Documents and Settings\Ronald.Noble\.m2\repository\cuke4duke\cuke4duke\0.4.3\cuke4duke-0.4.3.jar, C:\Documents and Settings\Ronald.Noble\.m2\repository\org\jruby\jruby-complete\1.5.6\jruby-complete-1.5.6.jar, C:\Documents and Settings\Ronald.Noble\.m2\repository\org\apache\ant\ant\1.8.2\ant-1.8.2.jar, C:\Documents and Settings\Ronald.Noble\.m2\repository\org\apache\ant\ant-launcher\1.8.2\ant-launcher-1.8.2.jar, C:\Documents and Settings\Ronald.Noble\.m2\repository\org\picocontainer\picocontainer\2.8.3\picocontainer-2.8.3.jar, C:\Documents and Settings\Ronald.Noble\.m2\repository\junit\junit\4.8.1\junit-4.8.1.jar]
[DEBUG] -- end configuration --
[DEBUG] Adding reference: jruby.classpath
[DEBUG] Executing 'C:\Program Files\Java\jdk1.6.0_21\jre\bin\java.exe' with arguments:
'-Dcuke4duke.objectFactory=cuke4duke.internal.jvmclass.PicoFactory'
'-classpath'
'C:\workspace\maven-cuke\target\test-classes;C:\workspace\maven-cuke\target\classes;C:\Documents and Settings\Ronald.Noble\.m2\repository\cuke4duke\cuke4duke\0.4.3\cuke4duke-0.4.3.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\jruby\jruby-complete\1.5.6\jruby-complete-1.5.6.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\apache\ant\ant\1.8.2\ant-1.8.2.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\apache\ant\ant-launcher\1.8.2\ant-launcher-1.8.2.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\picocontainer\picocontainer\2.8.3\picocontainer-2.8.3.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\junit\junit\4.8.1\junit-4.8.1.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\cuke4duke\cuke4duke-maven-plugin\0.4.3\cuke4duke-maven-plugin-0.4.3.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\codehaus\plexus\plexus-utils\1.5.1\plexus-utils-1.5.1.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\junit\junit\4.8.2\junit-4.8.2.jar'
'org.jruby.Main'
'C:\Documents and Settings\Ronald.Noble\.m2\repository\.jruby\bin\cuke4duke'
'C:\workspace\maven-cuke/target/test-classes'
'--tags'
'~@wip'
'features'
The ' characters around the executable and arguments are
not part of the command.
[DEBUG] Setting environment variable: GEM_HOME=C:\Documents and Settings\Ronald.Noble\.m2\repository\.jruby
[DEBUG] Setting environment variable: GEM_PATH=C:\Documents and Settings\Ronald.Noble\.m2\repository\.jruby
[DEBUG] Execute:Java13CommandLauncher: Executing 'C:\Program Files\Java\jdk1.6.0_21\jre\bin\java.exe' with arguments:
'-Dcuke4duke.objectFactory=cuke4duke.internal.jvmclass.PicoFactory'
'-classpath'
'C:\workspace\maven-cuke\target\test-classes;C:\workspace\maven-cuke\target\classes;C:\Documents and Settings\Ronald.Noble\.m2\repository\cuke4duke\cuke4duke\0.4.3\cuke4duke-0.4.3.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\jruby\jruby-complete\1.5.6\jruby-complete-1.5.6.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\apache\ant\ant\1.8.2\ant-1.8.2.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\apache\ant\ant-launcher\1.8.2\ant-launcher-1.8.2.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\picocontainer\picocontainer\2.8.3\picocontainer-2.8.3.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\junit\junit\4.8.1\junit-4.8.1.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\cuke4duke\cuke4duke-maven-plugin\0.4.3\cuke4duke-maven-plugin-0.4.3.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\org\codehaus\plexus\plexus-utils\1.5.1\plexus-utils-1.5.1.jar;C:\Documents and Settings\Ronald.Noble\.m2\repository\junit\junit\4.8.2\junit-4.8.2.jar'
'org.jruby.Main'
'C:\Documents and Settings\Ronald.Noble\.m2\repository\.jruby\bin\cuke4duke'
'C:\workspace\maven-cuke/target/test-classes'
'--tags'
'~@wip'
'features'
The ' characters around the executable and arguments are
not part of the command.
[INFO] C:\Documents and Settings\Ronald.Noble\.m2\repository\.jruby\bin\cuke4duke:9:in `require': no such file to load -- rubygems (LoadError)
[INFO] from C:\Documents and Settings\Ronald.Noble\.m2\repository\.jruby\bin\cuke4duke:9
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.515s
[INFO] Finished at: Wed Feb 16 12:19:19 GMT 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal cuke4duke:cuke4duke-maven-plugin:0.4.3:cucumber (default-cli) on project maven-cuke: JRuby failed. Java returned: 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal cuke4duke:cuke4duke-maven-plugin:0.4.3:cucumber (default-cli) on project maven-cuke: JRuby failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
Caused by: org.apache.maven.plugin.MojoExecutionException: JRuby failed.
at cuke4duke.mojo.CucumberMojo.execute(CucumberMojo.java:87)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111)
at cuke4duke.ant.JRubyTask.execute(JRubyTask.java:22)
at cuke4duke.ant.CucumberTask.execute(CucumberTask.java:15)
at cuke4duke.mojo.CucumberMojo.execute(CucumberMojo.java:84)
... 21 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Before I installed the gems myself I was getting this error, notice that it says gems is not recognised command
PasteBin StackTrace (Was too long to have both traces in one post)
Also I've tried uninstalling my JRuby and uninstalling the gems several times and allowing maven to install the gems but it just doesn't work.