Permalink
Browse files

Behave better without JAVA_HOME set and bump version

  • Loading branch information...
1 parent 8e1be7c commit cfbca9bfaa91b56c414183eb737ff5d9dd810871 @jcrossley3 jcrossley3 committed Sep 14, 2011
Showing with 6 additions and 3 deletions.
  1. +1 −1 lib/torquespec/as6.rb
  2. +1 −1 lib/torquespec/as7.rb
  3. +3 −0 lib/torquespec/torquespec.rb
  4. +1 −1 lib/torquespec/version.rb
View
@@ -6,7 +6,7 @@ def port
end
def start_command
- "#{ENV['JAVA_HOME']}/bin/java -cp #{TorqueSpec.jboss_home}/bin/run.jar #{TorqueSpec.jvm_args} -Djava.endorsed.dirs=#{TorqueSpec.jboss_home}/lib/endorsed org.jboss.Main"
+ "#{TorqueSpec.java_home}/bin/java -cp #{TorqueSpec.jboss_home}/bin/run.jar #{TorqueSpec.jvm_args} -Djava.endorsed.dirs=#{TorqueSpec.jboss_home}/lib/endorsed org.jboss.Main"
end
def shutdown
View
@@ -10,7 +10,7 @@ def port
end
def start_command
- "#{ENV['JAVA_HOME']}/bin/java #{TorqueSpec.jvm_args} -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.boot.log.file=#{TorqueSpec.jboss_home}/standalone/log/boot.log -Dlogging.configuration=file:#{TorqueSpec.jboss_home}/standalone/configuration/logging.properties -jar #{TorqueSpec.jboss_home}/jboss-modules.jar -mp #{TorqueSpec.jboss_home}/modules -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=#{TorqueSpec.jboss_home}"
+ "#{TorqueSpec.java_home}/bin/java #{TorqueSpec.jvm_args} -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.boot.log.file=#{TorqueSpec.jboss_home}/standalone/log/boot.log -Dlogging.configuration=file:#{TorqueSpec.jboss_home}/standalone/configuration/logging.properties -jar #{TorqueSpec.jboss_home}/jboss-modules.jar -mp #{TorqueSpec.jboss_home}/modules -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=#{TorqueSpec.jboss_home}"
end
def shutdown
@@ -36,6 +36,9 @@ def jruby_home
require 'java'
File.expand_path(java.lang.System.getProperty('jruby.home'))
end
+ def java_home
+ ENV['JAVA_HOME'] || File.expand_path(java.lang.System.getProperty('java.home'))
+ end
def jboss_home_from_server_gem
require 'torquebox-server'
TorqueBox::Server.jboss_home
@@ -1,3 +1,3 @@
module TorqueSpec
- VERSION = "0.4.1"
+ VERSION = "0.4.2"
end

0 comments on commit cfbca9b

Please sign in to comment.