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 <[email protected]> wrote: > simple as that: > > define "testo", :version=>'1.0.0' do > # run buildr package > package(:jar).with(compile.target) > end > > ________________________________________ > Von: Alex Boisvert [[email protected]] > Gesendet: Donnerstag, 19. November 2009 18:23 > An: [email protected] > 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 <[email protected] > >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 >
