Commits

Anonymous committed 19cffff

Build is now split to common.xml and build.xml files.

  • Participants
  • Parent commits 170d18a

Comments (0)

Files changed (4)

 clojure-contrib jars to your local ivy repository.
 
 For now neman provides:
-  - Parsing of command line arguments
-  - XML DOM construction and XML templates
-  - JSON library
+  - Parsing of command line arguments (wrapper for Apache commons-cli)
+  - XML DOM construction and XML templates (wrapper for jDOM)
+  - JSON library (wrapper for Jackson)
   - Jetty helpers for server configuration from Clojure scripts.
 -->
 <project name='neman' basedir='.' xmlns:ivy='antlib:org.apache.ivy.ant'>
 
-    <property name='build' location='${basedir}/build'/>
-    <property name='dist'  location='${basedir}/dist'/>
-    <property name='lib'   location='${basedir}/lib'/>
-    <property name='src'   location='${basedir}/src'/>
-
+    <import file='${basedir}/common.xml'/>
     <import file='${common.dir}/common.xml' optional='true'/>
 
-    <property file='${basedir}/local.properties'/>
-    <property file='${basedir}/build.properties'/>
-
     <property name='build.classes' location='${build}/classes'/>
     <property name='build.jar'     location='${build}/neman.jar'/>
 
-    <property name='docs.stylesheet' value='style.css'/>
-    <property name='docs.build' location='${build}/docs'/>
-    <property name='docs.dist'  location='${dist}/docs'/>
-
-    <!--
-    Apache Ivy (http://ant.apache.org/ivy/).
-    -->
-
-    <target name='ivy-download' unless='skip.ivy'>
-        <mkdir dir='${ivy.jar.dir}'/>
-        <get
-            src='${ivy.jar.src}' dest='${ivy.jar.dst}' usetimestamp='yes'/>
-    </target>
-
-    <target name='ivy-install' depends='ivy-download'>
-        <path id='ivy.lib.path'>
-            <fileset dir='${ivy.jar.dir}' includes='*.jar'/>
-        </path>
-        <taskdef
-            resource='org/apache/ivy/ant/antlib.xml'
-            uri='antlib:org.apache.ivy.ant'
-            classpathref='ivy.lib.path'/>
-    </target>
-
     <!--
     Neman targets.
     -->
         <ivy:retrieve/>
     </target>
 
-    <target name='textile-config' depends='resolve'>
-        <path id='textile.classpath'>
-            <fileset dir='${lib}'>
-                <include name='**/*.jar'/>
-            </fileset>
-        </path>
-        <taskdef
-            classpathref="textile.classpath"
-            resource="net/java/textilej/util/anttask/tasks.properties"/>
-    </target>
-
-    <target name='build-docs' depends='textile-config'>
-        <mkdir dir='${docs.build}'/>
-        <copy todir='${docs.build}'>
-            <fileset dir='${basedir}/docs'/>
-        </copy>
-        <textile-to-html>
-            <fileset dir='${docs.build}'>
-                <include name='**/*.textile'/>
-            </fileset>
-            <stylesheet url='${docs.stylesheet}'/>
-        </textile-to-html>
-    </target>
-
     <target name='build' depends='resolve, build-docs'>
         <mkdir dir='${build.classes}'/>
 
 
     </target>
 
-    <target name='dist' depends='build'>
-        <mkdir dir='${dist}'/>
-        <mkdir dir='${docs.dist}'/>
-        <copy todir='${docs.dist}'>
-            <fileset dir='${docs.build}'>
-                <exclude name='**/*.textile'/>
-            </fileset>
-        </copy>
-    </target>
+    <target name='dist' depends='dist-docs'/>
 
     <target name='publish' depends='build'>
         <ivy:publish
             pubrevision='0.0.1'
             artifactspattern='${build}/[artifact].[ext]'/>
     </target>
-
-    <target name='clean'>
-        <delete>
-            <fileset dir='${build}'/>
-            <fileset dir='${dist}'/>
-        </delete>
-    </target>
 </project>
+<!--
+  Copyright (c) 2008 Krešimir Šojat. All rights reserved.  The use and
+  distribution terms for this software are covered by the Common
+  Public License 1.0 (http://www.opensource.org/licenses/cpl1.0.php)
+  which can be found in the file CPL.TXT at the root of this
+  distribution.  By using this software in any fashion, you are
+  agreeing to be bound by the terms of this license.  You must not
+  remove this notice, or any other, from this software.
+-->
+<project name='common' xmlns:ivy='antlib:org.apache.ivy.ant'>
+    <property name='build' location='${basedir}/build'/>
+    <property name='dist'  location='${basedir}/dist'/>
+    <property name='lib'   location='${basedir}/lib'/>
+    <property name='src'   location='${basedir}/src'/>
+
+    <property name='doc.src'        location='${basedir}/docs'/>
+    <property name='doc.build'      location='${build}/docs'/>
+    <property name='doc.dist'       location='${dist}/docs'/>
+    <property name='doc.stylesheet' value='style.css'/>
+
+    <import file='${common.dir}/common.xml' optional='true'/>
+
+    <property file='${basedir}/local.properties'/>
+    <property file='${basedir}/build.properties'/>
+
+    <!--
+    Apache Ivy (http://ant.apache.org/ivy/).
+    -->
+
+    <target name='ivy-download' unless='skip.ivy'>
+        <mkdir dir='${ivy.jar.dir}'/>
+        <get
+            src='${ivy.jar.src}' dest='${ivy.jar.dst}' usetimestamp='yes'/>
+    </target>
+
+    <target name='ivy-install' depends='ivy-download'>
+        <path id='ivy.lib.path'>
+            <fileset dir='${ivy.jar.dir}' includes='*.jar'/>
+        </path>
+        <taskdef
+            resource='org/apache/ivy/ant/antlib.xml'
+            uri='antlib:org.apache.ivy.ant'
+            classpathref='ivy.lib.path'/>
+    </target>
+
+    <!--
+    Documentation generation with textile-j.
+    -->
+
+    <target name='textile-config' depends='resolve'>
+        <path id='textile.classpath'>
+            <fileset dir='${lib}'>
+                <include name='**/*.jar'/>
+            </fileset>
+        </path>
+        <taskdef
+            classpathref="textile.classpath"
+            resource="net/java/textilej/util/anttask/tasks.properties"/>
+    </target>
+
+    <target name='build-docs' depends='textile-config'>
+        <mkdir dir='${doc.build}'/>
+        <copy todir='${doc.build}'>
+            <fileset dir='${doc.src}'/>
+        </copy>
+        <textile-to-html>
+            <fileset dir='${doc.build}'>
+                <include name='**/*.textile'/>
+            </fileset>
+            <stylesheet url='${doc.stylesheet}'/>
+        </textile-to-html>
+    </target>
+
+    <target name='dist-docs' depends='build-docs'>
+        <mkdir dir='${doc.dist}'/>
+        <copy todir='${doc.dist}'>
+            <fileset dir='${doc.build}'>
+                <exclude name='**/*.textile'/>
+            </fileset>
+        </copy>
+    </target>
+
+    <!--
+    Clean.
+    -->
+
+    <target name='clean'>
+        <delete>
+            <fileset dir='${build}'/>
+            <fileset dir='${dist}'/>
+        </delete>
+    </target>
+</project>
         <dependency org='org.mortbay.jetty' name='jetty' rev='6.1.11'/>
         <dependency org='org.mortbay.jetty' name='jetty-plus' rev='6.1.11'/>
         <dependency org='jdom' name='jdom' rev='1.1'/>
+        <dependency org='jline' name='jline' rev='0.9.91'/>
     </dependencies>
 </ivy-module>