buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Riddle <allenrid...@gmail.com>
Subject Re: Compiling twice in one project
Date Fri, 11 Nov 2011 20:26:36 GMT
Thanks all, I will give this a shot and let you know how it goes.  This is
exactly what I was looking for.  So is define_task meant to be public?
 Thanks

On Fri, Nov 11, 2011 at 3:30 AM, Alex Boisvert <alex.boisvert@gmail.com>wrote:

> Hi Allen,
>
> Here's a working example,
>
> define "precompile-example" do
>
>  precompile = CompileTask.define_task(:precompile => :resources).tap do
> |compile|
>    compile.send :associate_with, project, :precompile
>    compile.using :javac
>    compile.from _(:src, :main, :precompile)
>  end
>  task :compile => [:precompile]
>
>  compile.with precompile.target
> end
>
> hope that helps,
> alex
>
> On Fri, Nov 11, 2011 at 9:27 AM, Alex Boisvert <alex.boisvert@gmail.com
> >wrote:
>
> > Yes that's what I was going to suggest.  Try it, if you can't get it to
> > work quickly enough, I can help. (Though I'm not close to a computer
> right
> > now to give full example).
> >
> > alex
> >
> >
> > On Friday, November 11, 2011, Allen Riddle <allenriddle@gmail.com>
> wrote:
> > > Is there a way to simply new up a CompileTask and use that in an
> enhance?
> > >
> > > On Thu, Nov 10, 2011 at 3:56 PM, Dominic Graefen
> > > <dominic.graefen@gmail.com>wrote:
> > >
> > >> For my buildr-as3 plugin I have a postprocessor on my compile output,
> > >> you could just call a function once the compile is complete:
> > >>
> > >> compile {
> > >> post_process_meth
> > >> }
> > >>
> > >> --
> > >> Dominic Graefen
> > >> Freelance: Interactive Developer / Creative Technologist
> > >> devboy.org
> > >>
> > >>
> > >> On Thursday, November 10, 2011 at 10:48 PM, Peter Donald wrote:
> > >>
> > >> > Hi,
> > >> >
> > >> > On Fri, Nov 11, 2011 at 4:35 AM, Allen Riddle <
> allenriddle@gmail.com
> > (mailto:
> > >> allenriddle@gmail.com)> wrote:
> > >> > > I have a project that needs 1 .java file compiled to be fed to
a
> > JAXB
> > >> > > compiler.  However, I'm unsure on how to essentially have a single
> > >> project
> > >> > > run a compile task twice.  My question is, using one project,
how
> > do I:
> > >> > >
> > >> > > 1.  Compile a .java file
> > >> > > 2.  Invoke the JAXB compiler using the .class file from step
one
> (I
> > >> have
> > >> > > this working)
> > >> > > 3.  Compile the generated JAXB .java classes to .class files
> > >> > >
> > >> >
> > >> >
> > >> > I don't think there is any real way to do this. The way that I would
> > >> > do it would be to have a separate project for the initial compile.
> > >> >
> > >> >
> > >> > --
> > >> > Cheers,
> > >> >
> > >> > Peter Donald
> > >>
> > >>
> > >
> >
>

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