mirror of https://github.com/apache/lucene.git
138 lines
4.3 KiB
XML
138 lines
4.3 KiB
XML
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
this work for additional information regarding copyright ownership.
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
(the "License"); you may not use this file except in compliance with
|
|
the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<project name="solrjs" default="dist" basedir=".">
|
|
|
|
<!-- our current version -->
|
|
<property name="version" value="1.4-dev"/>
|
|
|
|
<!-- a filelist for the core js files in correct order -->
|
|
<filelist id="src_core" dir="src/core" >
|
|
<file name="Core.js"/>
|
|
<file name="QueryItem.js"/>
|
|
<file name="Manager.js"/>
|
|
<file name="AbstractWidget.js"/>
|
|
<file name="AbstractServerSideWidget.js"/>
|
|
<file name="AbstractClientSideWidget.js"/>
|
|
</filelist>
|
|
|
|
<!-- a fileset for the server side widget files -->
|
|
<fileset id="src_serverside" dir="src/serverside" >
|
|
<include name="*.js"/>
|
|
</fileset>
|
|
|
|
<!-- a fileset for the client side widget files -->
|
|
<fileset id="src_clientside" dir="src/clientside" >
|
|
<include name="*.js"/>
|
|
</fileset>
|
|
|
|
|
|
<!-- create dist -->
|
|
<target name="clean">
|
|
<delete dir="dist" quiet="true"/>
|
|
<delete dir="doc" quiet="true"/>
|
|
</target>
|
|
|
|
<target name="create-dist-folder" depends="clean">
|
|
<mkdir dir="dist" />
|
|
</target>
|
|
|
|
<!-- create a single js file -->
|
|
<target name="concat" depends="create-dist-folder">
|
|
<concat destfile="dist/solrjs-${version}.js" fixlastline="true">
|
|
<filelist refid="src_core"/>
|
|
<fileset refid="src_serverside"/>
|
|
<fileset refid="src_clientside"/>
|
|
</concat>
|
|
</target>
|
|
|
|
<target name="dist" depends="concat,docs">
|
|
<jar destfile="dist/solrjs-${version}-templates.jar">
|
|
<fileset dir="src/templates" >
|
|
<include name="*.vm"/>
|
|
</fileset>
|
|
</jar>
|
|
</target>
|
|
|
|
<!-- create docs -->
|
|
<target name="docs">
|
|
<delete dir="dist/doc"/>
|
|
<mkdir dir="dist/doc"/>
|
|
<java jar="lib/jsdoc/jsdoc-toolkit/jsrun.jar" fork="true" failonerror="true">
|
|
<arg value="lib/jsdoc/jsdoc-toolkit/app/run.js"/>
|
|
<arg value="-r=4" />
|
|
<arg value="src/" />
|
|
<arg value="-t=lib/jsdoc/jsdoc-toolkit/templates/jsdoc"/>
|
|
<arg value="-d=dist/doc"/>
|
|
<arg value="-p"/>
|
|
</java>
|
|
</target>
|
|
|
|
|
|
<!--+
|
|
| Reuters example
|
|
+-->
|
|
|
|
<!-- start solr server, using example/reuters/testsolr/solr -->
|
|
<target name="reuters-start">
|
|
<copy todir="example/reuters/testsolr/solr/lib" overwrite="true">
|
|
<fileset dir="../../contrib/velocity/src/main/solr/lib/" />
|
|
</copy>
|
|
<copy file="dist/solrjs-${version}-templates.jar" todir="example/reuters/testsolr/solr/lib" />
|
|
<java jar="../../example/start.jar" fork="true" failonerror="true" dir="../../example">
|
|
<sysproperty key="solr.solr.home" value="../client/javascript/example/reuters/testsolr/solr"/>
|
|
</java>
|
|
</target>
|
|
|
|
<!-- import testdata (server has to be online via reuters-start) -->
|
|
<target name="reuters-import">
|
|
<javac srcdir="example/reuters/importer/java">
|
|
<classpath>
|
|
<fileset dir="../../lib">
|
|
<include name="*.jar"/>
|
|
</fileset>
|
|
<fileset dir="../../dist">
|
|
<include name="*.jar"/>
|
|
</fileset>
|
|
</classpath>
|
|
</javac>
|
|
<java classname="org.apache.solr.solrjs.ReutersService" fork="true" dir="example/reuters/testdata">
|
|
<arg value="http://localhost:8983/solr/" />
|
|
<arg value="." />
|
|
<classpath>
|
|
<fileset dir="../../lib">
|
|
<include name="*.jar"/>
|
|
</fileset>
|
|
<fileset dir="../../dist">
|
|
<include name="*.jar"/>
|
|
</fileset>
|
|
<fileset dir="../../dist/solrj-lib">
|
|
<include name="*.jar"/>
|
|
</fileset>
|
|
<path location="example/reuters/importer/java"/>
|
|
</classpath>
|
|
</java>
|
|
</target>
|
|
|
|
<!-- do nothing for now, required for generate maven artifacts -->
|
|
<target name="build"/>
|
|
<target name="example"/>
|
|
<target name="javadoc"/>
|
|
<target name="test"/> <!-- TODO: Tests would be nice :) -->
|
|
</project>
|
|
|
|
|