httplite: commit source archive from FELIX-3084.  Also see FELIX-538.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1182650 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/httplite/build.xml b/httplite/build.xml
new file mode 100644
index 0000000..9a4ecfb
--- /dev/null
+++ b/httplite/build.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<project name="org.apache.felix.http.lightweight" default="jar">
+	<property name="src.dir" location="src/" />
+	<property name="project.description" value="Lightweight HTTP Service for Apache Felix" />
+	<property name="external.dir" location="external" />
+	<property name="doc.dir" location="${basedir}/docs" />
+	<property name="build.dir" location="${basedir}/classes" />
+
+	<property name="wget.bin" location="/usr/bin/wget" />
+	<property name="svn.bin" location="/usr/bin/svn" />
+	<property name="git.bin" location="/usr/bin/git" />
+	<property name="rm.bin" location="/bin/rm" />
+
+	<property name="framework.fqpn" value="org.apache.felix.framework" />
+	<property name="compendium.fqpn" value="org.osgi.compendium" />
+
+	<tstamp>
+		<format property="TS_NOW" pattern="yyyy-MM-dd HH:mm:ss" />
+	</tstamp>
+
+	<target name="clean-external" unless="${skip.fetch}">
+		<delete dir="${external.dir}" />
+	</target>
+
+	<target name="clean" depends="clean-external" description="remove intermediate files">
+		<delete dir="${build.dir}" />
+		<delete dir="${build.dir}-debug" />
+		<delete dir="${doc.dir}" />
+		<delete dir="org/apache" />
+		<delete dir="org/osgi" />
+		<delete dir="bin" />
+		<delete file="${ant.project.name}-min.jar" />
+		<delete file="${ant.project.name}-all.jar" />
+	</target>
+
+	<target name="fetch" depends="clean" unless="${skip.fetch}">
+		<mkdir dir="${external.dir}" />
+		<exec executable="${wget.bin}" dir="${external.dir}">
+			<arg value="http://www.meisei-u.ac.jp/mirror/apache/dist//felix/org.apache.felix.framework-3.2.2.jar" />
+		</exec>
+
+		<exec executable="${svn.bin}">
+			<arg value="export" />
+			<arg value="http://svn.apache.org/repos/asf/felix/releases/org.osgi.compendium-1.4.0" />
+			<arg value="${external.dir}/org.osgi.compendium" />
+		</exec>
+
+		<exec executable="${svn.bin}">
+			<arg value="export" />
+			<arg value="http://svn.apache.org/repos/asf/tomcat/archive/servletapi/branches/other/servlet2.4-jsp2.0-tc5.x/ASF/jsr154" />
+			<arg value="${external.dir}/servletapi" />
+		</exec>
+	</target>
+
+	<target name="stage-dependencies" depends="fetch">
+		<copy toDir="${src.dir}">
+			<fileset dir="${external.dir}/org.osgi.compendium/src" includes="main/java/org/osgi/service/http/**/*.java" />
+		</copy>
+
+		<copy toDir="${src.dir}">
+			<fileset dir="${external.dir}/servletapi/src" />
+		</copy>
+		<copy toDir="${src.dir}/share/javax/servlet/http">
+			<fileset dir="${external.dir}/servletapi/examples/WEB-INF/classes" includes="*.properties" />
+		</copy>
+		<copy toDir="${src.dir}/share/javax/servlet/resources">
+			<fileset dir="${src.dir}/share/dtd" />
+		</copy>
+
+		<delete dir="${src.dir}/etc" />
+		<delete dir="examples" />
+	</target>
+
+	<target name="compile" depends="stage-dependencies" description="compile the Java source code to class files">
+		<mkdir dir="${build.dir}" />
+		<mkdir dir="${build.dir}-debug" />
+
+		<javac destdir="${build.dir}" source="1.4" target="1.4" encoding="utf-8" fork="true" includeantruntime="false" debug="false">
+			<src path="${src.dir}/main/java" />
+			<src path="${src.dir}/share" />
+			<classpath path="${external.dir}/org.apache.felix.framework-3.2.2.jar" />
+		</javac>
+		<javac destdir="${build.dir}-debug" source="1.4" target="1.4" encoding="utf-8" fork="true" includeantruntime="false" debug="true" debuglevel="lines,vars,source">
+			<src path="${src.dir}/main/java" />
+			<src path="${src.dir}/share" />
+			<classpath path="${external.dir}/org.apache.felix.framework-3.2.2.jar" />
+		</javac>
+	</target>
+
+	<target name="jar" depends="compile" description="create a Jar file for the application">
+		<mkdir dir="${build.dir}/META-INF" />
+		<copy toDir="${build.dir}/META-INF-MIN">
+			<fileset dir="META-INF" />
+		</copy>
+
+		<copy toDir="${build.dir}/META-INF-ALL">
+			<fileset dir="META-INF" />
+		</copy>
+
+		<manifest file="${build.dir}/META-INF-ALL/MANIFEST.MF" mode="update">
+			<attribute name="Import-Package" value="org.osgi.framework" />
+			<attribute name="Export-Package" value='org.osgi.service.http;version="1.2.1", javax.servlet;version="2.4",javax.servlet.http;version="2.4",javax.servlet.resources;version="2.4"' />
+			<attribute name="Built-By" value="${user.name}" />
+			<attribute name="Built-Date" value="${TS_NOW}" />
+		</manifest>
+
+		<manifest file="${build.dir}/META-INF-MIN/MANIFEST.MF" mode="update">
+			<attribute name="Import-Package" value="org.osgi.framework,org.osgi.service.http,javax.servlet,javax.servlet.http,javax.servlet.resources" />
+			<attribute name="Export-Package" value="" />
+			<attribute name="Built-By" value="${user.name}" />
+			<attribute name="Built-Date" value="${TS_NOW}" />
+		</manifest>
+
+		<jar destfile="${ant.project.name}-debug-all.jar" manifest="${build.dir}/META-INF-ALL/MANIFEST.MF">
+			<fileset dir="${build.dir}-debug" includes="**/*.class,**/*.properties,**/*.dtd,**/*.xsd" />
+			<fileset dir="${src.dir}/share" includes="javax/servlet/**/*.properties,javax/servlet/**/*.dtd,javax/servlet/**/*.xsd" />
+			<fileset dir="." includes="LICENSE-2.0.txt" />
+		</jar>
+
+		<jar destfile="${ant.project.name}-all.jar" manifest="${build.dir}/META-INF-ALL/MANIFEST.MF">
+			<fileset dir="${build.dir}" includes="**/*.class,**/*.properties,**/*.dtd,**/*.xsd" />
+			<fileset dir="${src.dir}/share" includes="javax/servlet/**/*.properties,javax/servlet/**/*.dtd,javax/servlet/**/*.xsd" />
+			<fileset dir="." includes="LICENSE-2.0.txt" />
+		</jar>
+
+		<jar destfile="${ant.project.name}-min.jar" manifest="${build.dir}/META-INF-MIN/MANIFEST.MF">
+			<fileset dir="${build.dir}" includes="org/apache/felix/http/lightweight/**/*.class" />
+			<fileset dir="." includes="LICENSE-2.0.txt" />
+		</jar>
+	</target>
+
+	<target name="javadoc" depends="jar">
+		<javadoc sourcepath="${src.dir}/main/java" defaultexcludes="no" destdir="${doc.dir}" version="true" use="true" windowtitle="${project.description}">
+			<classpath path="${external.dir}/org.apache.felix.framework-3.2.2.jar" />
+			<classpath path="${external.dir}/osgi.cmpn.jar" />
+		</javadoc>
+	</target>
+</project>
\ No newline at end of file