Newbie question.

I'm trying to run a Hello world class with buildr using the "Java" task
http://incubator.apache.org/buildr/rdoc/classes/Buildr/Java.html#M000067

But I don't understand how to use it :(

Could you give me a hint. thanks.

Here's my buildfile:

# Generated by Buildr 1.2.10, change to your liking
# Version number for this release
VERSION_NUMBER = "1.0.0"
# Version number for the next release
NEXT_VERSION = "1.0.1"
# Group identifier for your projects
GROUP = "buildr"
COPYRIGHT = ""

LANG = "commons-lang:commons-lang:jar:2.1"

# Specify Maven 2.0 remote repositories here, like this:
repositories.remote << "http://www.ibiblio.org/maven2/";

# run Hello class
task :run => [:package] do |t|
 puts "----------------------"
 puts "Running Hello Class..."
 puts "----------------------"
 puts "\n"
 cp = [REQUIRES, LANG]
 Java.java('example.Hello', "-jar
target/buildr-#{VERSION_NUMBER}.jar", {:classpath => cp, :verbose =>
true})
end

desc "The Buildr project"
define "buildr" do

 project.version = VERSION_NUMBER
 project.group = GROUP
 manifest["Implementation-Vendor"] = COPYRIGHT
 manifest["Main-Class"] = 'example.Hello'
 compile.with LANG
 resources
 test.compile.with LANG
 test.resources
 package(:jar)
end

-- 
Benjamin Francisoud
http://rubyscube.blogspot.com

Reply via email to