Hi.  I'm new to Buildr, coming from Ant and Maven.  I've read the black Buildr 
book, and now I'm attempting to do some simple stuff with the JAXB XJC task.  
Here's what I have so far:

...
    compile :xjc
    package :jar, :id => 'vzapi'

    task :xjc do
          begin
          ant('xjc') do |ant|
            xjcOutput='target/generated-sources/xjc'
            rm_rf "#{xjcOutput}"
            mkdir_p "#{xjcOutput}"
            
t=Dir.entries("#{ENV['HOME']}/tools/jaxb-ri/lib").join(File::PATH_SEPARATOR)
            puts t
            ant.taskdef :name=>"xjc", :classname=>"com.sun.tools.xjc.XJCTask", 
:classpath=>"#{t}"
            ant.xjc :schema=>"src/main/resources/c.xsd", 
:destdir=>"#{xjcOutput}", :package=>"org.foo.api"
          end
        end
    end

where you can see my horribly clumsy, two-left-foot attempts to put together a 
classpath for the Ant taskdef.  The JAXB jars are in 
ENV['HOME']}/tools/jaxb-ri/lib/*.jar.

Can someone suggest the "Buildr way" to build this classpath?  I've studied the 
examples referred to here 
http://www.mail-archive.com/[email protected]/msg01115.html but I'm still 
not quite getting it.  I'm learning Ruby as I go, having read the Pickaxe book, 
but where not a lot of it has sunk in yet.

Thanks!

--
Mark Petrovic


Reply via email to