2011-07-08 02:41:23 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
|
|
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.
|
|
|
|
-->
|
2013-07-11 00:03:24 -04:00
|
|
|
<project name="solr-core" default="default" xmlns:ivy="antlib:org.apache.ivy.ant">
|
2011-07-08 02:41:23 -04:00
|
|
|
<description>Solr Core</description>
|
|
|
|
|
2012-04-04 01:03:53 -04:00
|
|
|
<!-- html file for testing -->
|
2012-09-13 20:28:43 -04:00
|
|
|
<property name="rat.excludes" value="**/htmlStripReaderTest.html,**/*.iml"/>
|
2013-07-11 00:03:24 -04:00
|
|
|
|
|
|
|
<property name="test.lib.dir" location="test-lib"/>
|
2012-04-04 01:03:53 -04:00
|
|
|
|
2013-11-10 17:50:51 -05:00
|
|
|
<property name="forbidden-tests-excludes" value="
|
|
|
|
org/apache/solr/internal/**
|
|
|
|
org/apache/solr/search/DocSetPerf.class
|
|
|
|
"/>
|
|
|
|
|
2011-07-08 02:41:23 -04:00
|
|
|
<import file="../common-build.xml"/>
|
|
|
|
|
2011-07-28 00:02:09 -04:00
|
|
|
<target name="compile-core" depends="compile-solrj,common-solr.compile-core"/>
|
2011-07-08 02:41:23 -04:00
|
|
|
|
2013-07-11 00:03:24 -04:00
|
|
|
<path id="test.classpath">
|
|
|
|
<path refid="solr.test.base.classpath"/>
|
|
|
|
<fileset dir="${test.lib.dir}" includes="*.jar"/>
|
|
|
|
</path>
|
|
|
|
|
2012-09-20 12:15:10 -04:00
|
|
|
<!-- specialized to ONLY depend on solrj -->
|
|
|
|
<target name="javadocs" depends="compile-core,define-lucene-javadoc-url,lucene-javadocs,javadocs-solrj">
|
|
|
|
<sequential>
|
|
|
|
<mkdir dir="${javadoc.dir}/${name}"/>
|
|
|
|
<solr-invoke-javadoc>
|
|
|
|
<solrsources>
|
|
|
|
<packageset dir="${src.dir}"/>
|
|
|
|
</solrsources>
|
|
|
|
<links>
|
|
|
|
<link href="../solr-solrj"/>
|
|
|
|
</links>
|
|
|
|
</solr-invoke-javadoc>
|
|
|
|
<solr-jarify basedir="${javadoc.dir}/${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
|
|
|
|
</sequential>
|
|
|
|
</target>
|
|
|
|
|
2013-11-02 01:04:19 -04:00
|
|
|
<target name="-dist-maven" depends="-dist-maven-src-java"/>
|
2012-11-23 14:45:50 -05:00
|
|
|
|
2013-07-11 00:03:24 -04:00
|
|
|
<target name="resolve" depends="ivy-availability-check,ivy-fail,ivy-configure">
|
|
|
|
<sequential>
|
|
|
|
<ivy:retrieve conf="compile,compile.hadoop" type="jar,bundle" sync="${ivy.sync}" log="download-only"/>
|
|
|
|
<ivy:retrieve conf="test,test.DfsMiniCluster" type="jar,bundle,test" sync="${ivy.sync}" log="download-only"
|
|
|
|
pattern="${test.lib.dir}/[artifact]-[revision](-[classifier]).[ext]"/>
|
|
|
|
</sequential>
|
|
|
|
</target>
|
2012-11-23 14:45:50 -05:00
|
|
|
|
|
|
|
<target name="javacc" depends="javacc-QueryParser"/>
|
|
|
|
<target name="javacc-QueryParser" depends="resolve-javacc">
|
|
|
|
<sequential>
|
|
|
|
<invoke-javacc target="src/java/org/apache/solr/parser/QueryParser.jj"
|
|
|
|
outputDir="src/java/org/apache/solr/parser"/>
|
|
|
|
|
|
|
|
<!-- Change the incorrect public ctors for QueryParser to be protected instead -->
|
|
|
|
<replaceregexp file="src/java/org/apache/solr/parser/QueryParser.java"
|
|
|
|
byline="true"
|
|
|
|
match="public QueryParser\(CharStream "
|
|
|
|
replace="protected QueryParser(CharStream "/>
|
|
|
|
<replaceregexp file="src/java/org/apache/solr/parser/QueryParser.java"
|
|
|
|
byline="true"
|
|
|
|
match="public QueryParser\(QueryParserTokenManager "
|
|
|
|
replace="protected QueryParser(QueryParserTokenManager "/>
|
|
|
|
|
|
|
|
</sequential>
|
|
|
|
</target>
|
|
|
|
<target name="resolve-javacc" xmlns:ivy="antlib:org.apache.ivy.ant">
|
|
|
|
<!-- setup a "fake" JavaCC distribution folder in ${build.dir} to make JavaCC ANT task happy: -->
|
|
|
|
<ivy:retrieve organisation="net.java.dev.javacc" module="javacc" revision="5.0"
|
2013-07-11 00:03:24 -04:00
|
|
|
inline="true" transitive="false" type="jar" sync="true"
|
2012-11-23 14:45:50 -05:00
|
|
|
pattern="${build.dir}/javacc/bin/lib/[artifact].[ext]"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<macrodef name="invoke-javacc">
|
|
|
|
<attribute name="target"/>
|
|
|
|
<attribute name="outputDir"/>
|
|
|
|
<sequential>
|
|
|
|
<mkdir dir="@{outputDir}"/>
|
|
|
|
<delete>
|
|
|
|
<fileset dir="@{outputDir}" includes="*.java">
|
|
|
|
<containsregexp expression="Generated.*By.*JavaCC"/>
|
|
|
|
</fileset>
|
|
|
|
</delete>
|
|
|
|
<javacc
|
|
|
|
target="@{target}"
|
|
|
|
outputDirectory="@{outputDir}"
|
|
|
|
javacchome="${build.dir}/javacc"
|
|
|
|
jdkversion="${javac.source}"
|
|
|
|
/>
|
|
|
|
<fixcrlf srcdir="@{outputDir}" includes="*.java" encoding="UTF-8">
|
|
|
|
<containsregexp expression="Generated.*By.*JavaCC"/>
|
|
|
|
</fixcrlf>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
|
|
|
|
|
|
|
|
2011-07-28 00:02:09 -04:00
|
|
|
</project>
|