Ramakrishnan Muthukrishnan <[email protected]> writes:
> Hi,
>
> I am trying to package clojure-contrib for Debian and one of the
> debian java packaging practices is that the build should not download
> any external dependencies. All the dependencies should be debian
> packages themselves.
>
> I tried building clojure-contrib with mvn -Dclojure.jar=<path to
> locally built clojure.jar> as detailed in the README.txt, but maven
> seem to ignore this and download the jar from the build server. To
> replicate this, please try removing
> ~/.m2/repository/org/clojure/clojure directory. I also tried passing
> the -o flag to maven, but it fails to take the local clojure.jar file.
> I am very new to java build systems like maven, so it is very likely
> that I am missing something. I will be happy to try out any
> suggestions I can get from here.
In order to use command like this:
mvn -Denv=local -Dclojure.jar=/path/to/clojure.jar package
there are needed two things:
1. maven profile, which will be activated by "-Denv=local"
2. dependency defined with "system" scope and "systemPath"
I can not find anything like that in clojure-contrib pom.xml.
So I added this part to original pom.xml
(just before the "</project>" tag):
<profiles>
<profile>
<id>env-local</id>
<activation>
<property>
<name>env</name>
<value>local</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>${clojure.version}</version>
<scope>system</scope>
<systemPath>${clojure.jar}</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
and now this command:
mvn -Denv=local -Dclojure.jar=/path/to/clojure.jar package
started to work.
This profile can be activate also like this:
mvn -P env-local -Dclojure.jar=/path/to/clojure.jar package
Br,
Rob
--
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