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: bad error-reporting
Date Sat, 21 Nov 2009 02:17:41 GMT
The first issue here was that because 'src/main/java' didn't exist, then the
Java compiler wasn't being selected.  As a result, compile.target was nil
and since nil.to_s is equal to '' (empty string) and you would get strange
exceptions about task ''.

If you had added compile.using :javac, you would not have gotten any
exception -- although it would have resulted in a .jar file without any
.classes.

In any case, I've added a few checks so we now fail-fast if there's any nil
values being passed into package.with() or include().

alex

On Thu, Nov 19, 2009 at 11:43 AM, Peter Schröder <ps@blau.de> wrote:

> simple as that:
>
> define "testo", :version=>'1.0.0' do
>  # run buildr package
>  package(:jar).with(compile.target)
> end
>
> ________________________________________
> Von: Alex Boisvert [alex.boisvert@gmail.com]
> Gesendet: Donnerstag, 19. November 2009 18:23
> An: users@buildr.apache.org
> Betreff: Re: bad error-reporting
>
> Can you provide an example project that illustrates this?  I can dig into
> it.
>
> alex
>
> On Thu, Nov 19, 2009 at 1:57 AM, Peter Schröder <Peter.Schroeder@blau.de
> >wrote:
>
> > hi,
> >
> > we are migrating our projects to buildr and there is often the case that
> we
> > miss to copy some folder or something is empty.
> >
> > in this case rake aborts with:
> >
> > Don't know how to build task ''
> >
> > this error message is not very helpfull especially for the newbees
> around.
> >
> > i played around a little bit with the messages produced in rake to at
> least
> > specify the current scope of the failure, but i was not very pleased with
> my
> > approach.
> >
> > is there some better way to provide a detailed error-message?
> >
> > i would expect somthing like:
> >
> > - Could not build forder 'src/test/java' because it does not exist -
> >
> > kind regards,
> > peter
>

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