On 3 Jul 2011, at 21:57, Konrad Hinsen wrote:

I am looking for a build tool that fulfills the following requirements:

1) Must handle Clojure namespaces that are AOT-compiled.
2) Must handle Clojure namespaces that are not AOT-compiled.
3) Must handle Java source code files.
4) Must handle dependencies in the form of on-disk jar files (not in any repository)
5) No XML configuration files.

Thanks for everyone's suggestions and comments!

Some remarks:

Gradle/clojuresque: I never tried them, but it looks like I should!

AOT compilation: My case is probably a bit complex in this respect. I need AOT compilation only because I want to produce an executable jar, so there is at least one namespace that must be AOT compiled. For building that executable jar, it doesn't matter if everything else is AOT compiled as well. But I want to be able to build a standard library jar with just the Clojure code to make sure it works with future Clojure releases. One solution would be to have two completely different builds, one for the executable jar and one for the library version, but using the same set of source code files.


On 4 Jul 2011, at 00:06, Phil Hagelberg wrote:


4) Must handle dependencies in the form of on-disk jar files (not in
any repository)

For the record, leiningen can do this by adding a repository with a
file:/// URL; it's just not documented because I think it's a bad idea.

With absolute filenames in a URL, it's indeed a bad idea because the project becomes specific to a machine/installation. What I'd like to see instead is a project-local repository, e.g. a "deps" folder with jar files and source code directories.

There are several reasons why I want dependencies outside of repositories:

1) Simplicity. I want to distribute a single tar file to collaborators (who are new to Clojure and the JVM world) containing all dependencies and build scripts. I want to tell them "install <name of build tool>, take this file, play with the source code, and just type <build- command> to build an executable". They will struggle with a new language and a new environment already, there's no need to add the complexities of repositories. To make it worse, we all live behind proxies that require messy configuration for tools like Maven.

2) Network independence. I often work without Internet access, and I don't want to be blocked at some point because some build tool wants to access some repository to see if my version is still current.

3) Confidentiality. Sometimes I work with unpublished code that I promised not to give to anyone else. I can't keep that promise if the code leaves my machine in any way. For that case, the file:/// repository would of course be fine.


On 4 Jul 2011, at 01:30, Anthony Grimes wrote:

Cake can indeed handle Java source files. Throw them in src/jvm, I believe. Leiningen and cake can both handle on-disk jar files, but (at least in cakes case) they need to be installed in the local repository.

Having used cake in the past for simpler projects, I know that it can handle project-local dependencies. Just add a classpath setting to .cake/config (I'd have to look up the exact name of that variable). If cake can indeed handle Java code, then it might be just fine for my needs.


On 4 Jul 2011, at 03:29, Mark Derricutt wrote:

The other option is Polyglot Maven, which hasn't really seen much movement lately, but gives you maven power without the XML ( clojure source, yaml, etc. )

http://polyglot.sonatype.org/clojure.html

Being Maven, this would still require repositories, right? Even a local Maven repository is more than I'd like to impose on my collaborators.


On 4 Jul 2011, at 07:16, Shantanu Kumar wrote:

Maven works, but if you don't want XML why not just use Leiningen?
Split your code base into various modules (each module having its own
project.clj) and have a shell script (or PowerShell script if you're
on Windows) to take care of the dependencies while building across
modules.

I'd prefer one build system to two separate layers, one of which I'd write myself. Moreover, most of my dependencies are not projects, but simply jar files picked up from various sources.


Thanks again to everyone! I'll look at Java with cake, and also at Gradle.

Konrad.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to