buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: xjc and Buildr
Date Tue, 16 Feb 2010 19:17:58 GMT
On Tue, Feb 16, 2010 at 10:44 AM, Kerry Wilson <KWilson@picagroup.com>wrote:

> I need to be able to generate Classes using xjc.  This is currently being
> done using ant:
>
> <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
>  <classpath>
>    <fileset dir="${common.devlib.dir}" includes="*.jar"/>
>  </classpath>
> </taskdef>
> <target name="generate_jaxb_classes">
>  <mkdir dir="${gen.src.dir}"/>
>  <xjc schema="${jaxb.schema}" destDir="${gen.src.dir}"
> package="${jaxb.package}"/>
> </target>
>
> Is there a way to do the equivalent in Buildr?  Using ant task or (even
> better) w/o using ant task?
>

It's pretty easy to use Ant tasks from Buildr.  Buildr embeds
Antwrap<http://antwrap.rubyforge.org/>and the API doc is here:
http://buildr.apache.org/rdoc/classes/Buildr/Ant.html

You'll find a few examples under
/usr/lib/ruby/gems/1.8/gems/buildr-1.3.5/addon/buildr (or wherever Buildr is
installed on your system).   There are other plugins/extensions floating
around and blog posts, e.g.
http://zeusville.wordpress.com/2010/02/13/buildr-ant-maven/)) that should
give you a pretty good idea how to get there.

Ask questions if you need help.

alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message