You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Jean-Philippe Caruana <jp...@target2sell.com> on 2014/11/03 10:51:07 UTC

Re: scala build

Hi,

yes, you're correct, I am using a local file dependency:
$ cat build.yml
scala.version: 2.10.4

SOrry for wasting your time with too few information.

But it still doesn't work:
Expected ./target/querySimulator-1.0.0-SNAPSHOT.tgz to not contain
'lib/scala-compiler-2.10.4.jar'
Buildr aborted!
RuntimeError : Checks failed for project querySimulator (see errors above).

What stikes me is I used to remove scala-compiler years ago in a project
now dead in a company I left since. I kept the buildfile and this
worked, back in 2011:

    lib_generee = package(:jar).exclude('.scala-deps')
    livrable = package :tgz
    livrable.include _('src/main/batch')
    livrable.path('batch/lib').include
compile.dependencies.exclude('scala-compiler.jar'), lib_generee

$ cat build.yaml
junit: 4.8.2
scala.version: 2.8.1
scala.check: 1.7
scala.test: 1.2


How come this doesn't work anymore ?
What am i doing wrong ?


Thanks.

Le 31/10/2014 23:01, Peter Donald a écrit :
> Hi,
>
> It looks like you are using a local/file dependency which I did not account
> for. So what you need to do is add the prefix like
> "!a.respond_to?(:to_spec) || " in your select block. I have updated the
> example [1] to demonstrate this.
>
> HTH
>
> [1]
> https://github.com/realityforge/buildr-examples/commit/2649848058d9213e8be928148686685d57ffb566

-- 
Jean-Philippe Caruana
http://www.barreverte.fr


Re: scala build

Posted by Jean-Philippe Caruana <jp...@target2sell.com>.
Thanks ! It works like a charm.

Le 04/11/2014 10:05, Peter Donald a écrit :
> Hi,
>
> On Mon, Nov 3, 2014 at 8:51 PM, Jean-Philippe Caruana <jp...@target2sell.com>
> wrote:
>
>> But it still doesn't work:
>> Expected ./target/querySimulator-1.0.0-SNAPSHOT.tgz to not contain
>> 'lib/scala-compiler-2.10.4.jar'
>> Buildr aborted!
>> RuntimeError : Checks failed for project querySimulator (see errors above).
>>
> Ok - so now I see what the problem is. The dependencies list includes a
> string dependency that identifies a file and it is this one you want to
> exclude. If so you could probably replace "compile.dependencies" with
> "compile.dependencies.select
> {|a| !(a.to_s =~/scala-compiler-2.10.4.jar$/)}".  That would remove the one
> dependency that when converted to a string matched the filename.
>
> Hope that helps.
>

-- 
Jean-Philippe Caruana 
http://www.barreverte.fr


Re: scala build

Posted by Peter Donald <pe...@realityforge.org>.
Hi,

On Mon, Nov 3, 2014 at 8:51 PM, Jean-Philippe Caruana <jp...@target2sell.com>
wrote:

> But it still doesn't work:
> Expected ./target/querySimulator-1.0.0-SNAPSHOT.tgz to not contain
> 'lib/scala-compiler-2.10.4.jar'
> Buildr aborted!
> RuntimeError : Checks failed for project querySimulator (see errors above).
>

Ok - so now I see what the problem is. The dependencies list includes a
string dependency that identifies a file and it is this one you want to
exclude. If so you could probably replace "compile.dependencies" with
"compile.dependencies.select
{|a| !(a.to_s =~/scala-compiler-2.10.4.jar$/)}".  That would remove the one
dependency that when converted to a string matched the filename.

Hope that helps.

-- 
Cheers,

Peter Donald