summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-04-14 12:37:04 +0000
committerRich Hickey <richhickey@gmail.com>2009-04-14 12:37:04 +0000
commitcbef0c9bd1f6bd80c9e8e3cdaaaa031ab25fe6e0 (patch)
treec11631f1d894592340e8e0e0c455813a11c264d0
parentc9469df726e0b8580db7d3d724346c863dcfe9eb (diff)
Build patch: install results to local Maven repository [issue 105], patch from hlship
-rw-r--r--build.xml69
1 files changed, 41 insertions, 28 deletions
diff --git a/build.xml b/build.xml
index 42340156..690f1e7a 100644
--- a/build.xml
+++ b/build.xml
@@ -1,10 +1,10 @@
<project name="clojure" default="all" xmlns:mvn="urn:maven-artifact-ant">
<description>
- Build with "ant jar" and then start the
- REPL with: "java -cp clojure.jar clojure.main".
+ Build with "ant jar" and then start the
+ REPL with: "java -cp clojure.jar clojure.main".
You will need to install the Maven Ant
- Tasks to ${ant.home}/lib in order to execute
+ Tasks to ${ant.home}/lib in order to execute
the nightly-build or stable-build targets.
</description>
@@ -72,43 +72,56 @@
</manifest>
</jar>
</target>
-
+
<target name="clojure-sources" depends="init"
- description="Create a JAR of Java sources.">
+ description="Create a JAR of Java sources.">
<jar jarfile="${src_jar}" basedir="${jsrc}"/>
</target>
<target name="jar" depends="clojure"/>
<target name="all" depends="clojure,clojure-slim,clojure-sources"/>
-
+
<target name="clean"
description="Remove autogenerated files and directories.">
<delete dir="${build}"/>
</target>
- <macrodef name="deploy">
- <attribute name="target-dir" description="Root of Maven repository"/>
- <sequential>
- <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"/>
- <mvn:deploy file="${clojure_jar}">
- <pom file="pom.xml"/>
- <attach file="${src_jar}" classifier="sources"/>
- <attach file="${slim_jar}" classifier="slim"/>
- <remoteRepository url="file:@{target-dir}"/>
- </mvn:deploy>
- </sequential>
- </macrodef>
-
- <target name="nightly-build" depends="clean,all"
- description="Build and deploy to nightly (snapshot) repository.">
- <deploy target-dir="${snapshot.repo.dir}"/>
- </target>
-
-
- <target name="stable-build" depends="clean,all" description="Build and deploy to stable repository.">
- <deploy target-dir="${stable.repo.dir}"/>
- </target>
+ <target name="-setup-maven">
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"/>
+ </target>
+
+ <macrodef name="deploy">
+ <attribute name="target-dir" description="Root of Maven repository"/>
+ <sequential>
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"/>
+ <mvn:deploy file="${clojure_jar}">
+ <pom file="pom.xml"/>
+ <attach file="${src_jar}" classifier="sources"/>
+ <attach file="${slim_jar}" classifier="slim"/>
+ <remoteRepository url="file:@{target-dir}"/>
+ </mvn:deploy>
+ </sequential>
+ </macrodef>
+
+ <target name="ci-build" depends="clean,all,-setup-maven"
+ description="Continous integration build, installed to local repository.">
+ <mvn:install file="${clojure_jar}">
+ <pom file="pom.xml"/>
+ <attach file="${src_jar}" classifier="sources"/>
+ <attach file="${slim_jar}" classifier="slim"/>
+ </mvn:install>
+ </target>
+
+ <target name="nightly-build" depends="ci-build"
+ description="Build and deploy to nightly (snapshot) repository.">
+ <deploy target-dir="${snapshot.repo.dir}"/>
+ </target>
+
+
+ <target name="stable-build" depends="ci-build" description="Build and deploy to stable repository.">
+ <deploy target-dir="${stable.repo.dir}"/>
+ </target>
</project>