I'm new to Maven. Thank you for the explanation.
Using git-submodules and <sourceDirectories> is a good idea. Prior to
using your plugin, I use clojure and clojure-contrib with Maven like
this:
1. Manually download from GitHub and compile clojure and clojure-
contrib.
2. Install them to the local Maven repository:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -
Dversion=SNAPSHOT -Dpackaging=jar -Dfile=clojure.jar
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure-
contrib -Dversion=SNAPSHOT -Dpackaging=jar -Dfile=clojure-contrib.jar
3. Add clojure and clojure-contrib and other dependencies that my
project uses in pom.xml:
...
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure-contrib</artifactId>
<version>SNAPSHOT</version>
</dependency>
...
</dependencies>
...
4. Use Exec Maven Plugin (http://mojo.codehaus.org/exec-maven-plugin/)
to run my Clojure file:
mvn exec:java -Dexec.mainClass="clojure.main" -Dexec.args="path/to/my/
clojure/file.clj"
I want to ask is there a better way to use clojure and clojure-contrib
and running Clojure file with Maven?
On Aug 25, 1:54 pm, Mark Derricutt <[email protected]> wrote:
> The plugin itself has NO dependency on clojure or clojure contrib so you'll
> need to add them to your own pom.xml first.
> This is mostly because a) clojure contrib hasn't been released or in maven
> central, b) I'm using clojure 1.1 on my own projects which isn't released.
>
> For my own projects, I have compojure and some other libs included as
> git-submodules in my repository, and have configured additional
> <sourceDirectories> to compile.
>
> --
>
> On Tue, Aug 25, 2009 at 4:19 PM, ngocdaothanh <[email protected]>wrote:
>
> > Is clojure-contrib included?
>
> > I tried but mvn clojure:compile gives:
> > Exception in thread "main" java.io.FileNotFoundException: Could not
> > locate clojure/contrib/json/read__init.class or clojure/contrib/json/
> > read.clj on classpath
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---