Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add local dependencies in buildr

Tags:

java

scala

buildr

For a java/scala project I have some dependencies that are not in a remote repository, but somewhere else in my filesystem. I have then two options, which lead to questions:

  1. I can add a lib/ directory in my project folder. How can I tell buildr to add the content to the class path ?

  2. I can use the builtin dependencies management system. Can I indicate a filesystem repository path instead of an http one ?

Thanks

like image 616
paradigmatic Avatar asked Dec 01 '09 07:12

paradigmatic


People also ask

How do I add a dependency in build Gradle?

To add a dependency to your project, specify a dependency configuration such as implementation in the dependencies block of your module's build.gradle file.


1 Answers

I found the solution I was looking for in buildr mailing list. The compile.with() method accepts an array of file names (with the path prefix of course). So if the dependencies are jars in a directory called lib you can just call:

compile.with Dir['lib/*.jar'] 

in the buildfile. Hope that will help other buildr adepts.

like image 121
paradigmatic Avatar answered Oct 01 '22 17:10

paradigmatic