Building Cucumber for Java on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Cucumber for Java on Windows

Trond Marius Øvstetun
Hi.

I am having problems running the rake tasks for Cucumber for Java on Windows.
When I run "jruby -S rake gem" in Cygwin I get the following stack:

ovstetun@trall cucumber-java>jruby -S rake gem --trace
(in C:/Users/ovstetun/Mesan/fagArbeid/cucumber_java/cucumber-java)
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
** README.txt is missing or in the wrong format for auto-intuiting.
   run `sow blah` and look at its text files
** History.txt is missing or in the wrong format for auto-intuiting.
   run `sow blah` and look at its text files
** Invoke gem (first_time)
** Invoke pkg/cucumber-java-0.0.2.gem (first_time, not_needed)
** Invoke pkg (first_time, not_needed)
** Invoke README.txt (first_time, not_needed)
** Invoke lib/cucumber-java-0.0.2.jar (first_time, not_needed)
** Invoke lib/cucumber/java.rb (first_time, not_needed)
** Invoke lib/cucumber/spring.rb (first_time, not_needed)
** Invoke lib/cucumber/pico_container.rb (first_time, not_needed)
** Invoke lib/cucumber/java/version.rb (first_time, not_needed)
** Invoke jar (first_time)
** Execute jar
mvn clean package
/usr/bin/sh: call: command not found
rake aborted!
Command failed with status (127): [mvn clean package...]
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:969:in `sh'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:982:in `call'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:982:in `sh'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1074:in `sh'
C:/Users/ovstetun/Mesan/fagArbeid/cucumber_java/cucumber-java/rakefile:60
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain'
c:/Java/jruby-1.2.0/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in `invoke_with_call_chain'
c:/Java/jruby-1.2.0/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:19:in `load'
c:\Java\jruby-1.2.0\bin\rake:19


When I run in the regular cmd-shell:
C:\Users\ovstetun\Mesan\fagArbeid\cucumber_java\cucumber-java>jruby -S rake gem --trace
(in C:/Users/ovstetun/Mesan/fagArbeid/cucumber_java/cucumber-java)
JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
** README.txt is missing or in the wrong format for auto-intuiting.
   run `sow blah` and look at its text files
** History.txt is missing or in the wrong format for auto-intuiting.
   run `sow blah` and look at its text files
** Invoke gem (first_time)
** Invoke pkg/cucumber-java-0.0.2.gem (first_time, not_needed)
** Invoke pkg (first_time, not_needed)
** Invoke README.txt (first_time, not_needed)
** Invoke lib/cucumber-java-0.0.2.jar (first_time, not_needed)
** Invoke lib/cucumber/java.rb (first_time, not_needed)
** Invoke lib/cucumber/spring.rb (first_time, not_needed)
** Invoke lib/cucumber/pico_container.rb (first_time, not_needed)
** Invoke lib/cucumber/java/version.rb (first_time, not_needed)
** Invoke jar (first_time)
** Execute jar
mvn clean package
rake aborted!
private method `split' called for nil:NilClass
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/repaired_system.rb:109:in `find_runnable
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/repaired_system.rb:73:in `repair_command
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/repaired_system.rb:125:in `system'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/win32.rb:23:in `rake_system'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:988:in `rake_system'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:981:in `sh'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1074:in `sh'
C:/Users/ovstetun/Mesan/fagArbeid/cucumber_java/cucumber-java/rakefile:60
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/bin/../lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/bin/../lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:19:in `load'
C:\Java\jruby-1.2.0\bin\..\bin\rake:19


Are these known problems? Anything to fix?
So far I have changed the rake-tasks the following:
task :jar do
  # sh 'mvn clean package'
  mv "target/cucumber-java-#{Cucumber::Java::VERSION::STRING}.jar", 'lib'
end

Then things work as long as I remember to run mvn package between each execution of rake gem..
Any tips to making this work?

--
TronD

_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: Building Cucumber for Java on Windows

Luis Lavena
2009/5/18 Trond Marius Øvstetun <[hidden email]>:
> Hi.
>
> I am having problems running the rake tasks for Cucumber for Java on
> Windows.
> When I run "jruby -S rake gem" in Cygwin I get the following stack:
>

The first thing is that you're running JRuby inside Cygwin. all batch
file calls will be intercepted by cygwin and not by the OS, thus
failing...

> [...]
> mvn clean package
> /usr/bin/sh: call: command not found
> rake aborted!

"call" is an internal command of Windows interpreter, that should have
work on a plain console.

>
> When I run in the regular cmd-shell:
> C:\Users\ovstetun\Mesan\fagArbeid\cucumber_java\cucumber-java>jruby -S rake
> gem --trace
> (in C:/Users/ovstetun/Mesan/fagArbeid/cucumber_java/cucumber-java)
> [...]
>
>
> Are these known problems? Anything to fix?
> So far I have changed the rake-tasks the following:
> task :jar do
>   # sh 'mvn clean package'
>   mv "target/cucumber-java-#{Cucumber::Java::VERSION::STRING}.jar", 'lib'
> end
>
> Then things work as long as I remember to run mvn package between each
> execution of rake gem..
> Any tips to making this work?
>

Can you upgrade to rake 0.8.7? There are known problems of
Kernel::system() on Windows that got fixed several versions after
0.8.4. Also, latest 0.8.7 fixed issues when calling shell commands
form JRuby.

gem update rake

HTH,
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel
Reply | Threaded
Open this post in threaded view
|

Re: Building Cucumber for Java on Windows

Trond Marius Øvstetun


On Mon, May 18, 2009 at 2:26 PM, Luis Lavena <[hidden email]> wrote:
2009/5/18 Trond Marius Øvstetun <[hidden email]>:
> Hi.
>
> I am having problems running the rake tasks for Cucumber for Java on
> Windows.
> When I run "jruby -S rake gem" in Cygwin I get the following stack:
>

The first thing is that you're running JRuby inside Cygwin. all batch
file calls will be intercepted by cygwin and not by the OS, thus
failing...

> [...]
> mvn clean package
> /usr/bin/sh: call: command not found
> rake aborted!

"call" is an internal command of Windows interpreter, that should have
work on a plain console.
>
> When I run in the regular cmd-shell:
> C:\Users\ovstetun\Mesan\fagArbeid\cucumber_java\cucumber-java>jruby -S rake
> gem --trace
> (in C:/Users/ovstetun/Mesan/fagArbeid/cucumber_java/cucumber-java)
> [...]
>
>
> Are these known problems? Anything to fix?
> So far I have changed the rake-tasks the following:
> task :jar do
>   # sh 'mvn clean package'
>   mv "target/cucumber-java-#{Cucumber::Java::VERSION::STRING}.jar", 'lib'
> end
>
> Then things work as long as I remember to run mvn package between each
> execution of rake gem..
> Any tips to making this work?
>

Can you upgrade to rake 0.8.7? There are known problems of
Kernel::system() on Windows that got fixed several versions after
0.8.4. Also, latest 0.8.7 fixed issues when calling shell commands
form JRuby.

Tried to update everything, including rake. Now I get the following trace:

C:\Users\ovstetun\Mesan\fagArbeid\cucumber_java\cucumber-java>jruby -S rake gem --trace
(in C:/Users/ovstetun/Mesan/fagArbeid/cucumber_java/cucumber-java)
** README.txt is missing or in the wrong format for auto-intuiting.
   run `sow blah` and look at its text files
** History.txt is missing or in the wrong format for auto-intuiting.
   run `sow blah` and look at its text files
** Invoke gem (first_time)
** Invoke pkg/cucumber-java-0.0.2.gem (first_time)
** Invoke pkg (first_time, not_needed)
** Invoke README.txt (first_time, not_needed)
rake aborted!
Don't know how to build task 'lib/cucumber-java-0.0.2.jar'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1728:in `[]'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:605:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/bin/../lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/bin/../lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
C:/Java/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:in `load'
C:\Java\jruby-1.2.0\bin\..\bin\rake:19


Any ideas?
 

gem update rake

HTH,
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel



--
TronD

_______________________________________________
rspec-devel mailing list
[hidden email]
http://rubyforge.org/mailman/listinfo/rspec-devel