Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Commit

Permalink
lucene 4.10.2 , download jars from maven, don't store in repo
Browse files Browse the repository at this point in the history
  • Loading branch information
tarzanek committed Nov 3, 2014
1 parent 718d716 commit dddfaf2
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build/*
dist/*
nbproject/private/*
lib/lucene-*
lib/solr/solr-*
95 changes: 89 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<project name="Luke" default="dist">
<defaultexcludes add="**/CVS"/>
<property name="build.dir" value="build"/>
<property name="build.ver" value="4.10.1"/>
<property name="build.ver" value="4.10.2"/>
<property name="lucene.version" value="${build.ver}"/>
<property name="dist.dir" value="dist"/>
<property name="jarfile" value="${build.dir}/luke-${build.ver}.jar"/>
<property name="jarallfile" value="${build.dir}/lukeall-${build.ver}.jar"/>
<property name="jarminfile" value="${build.dir}/lukemin-${build.ver}.jar"/>
<property name="srczip" value="${dist.dir}/luke-src-${build.ver}.zip"/>
<property name="srctgz" value="${dist.dir}/luke-src-${build.ver}.tgz"/>
<target name="init">
<target name="init" depends="-check-lucene, download-lucene">
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
Expand All @@ -17,8 +18,90 @@
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>

</target>

<property name="lucene-core.jar" value="lucene-core-${lucene.version}.jar"/>
<property name="lucene-analyzers-common.jar" value="lucene-analyzers-common-${lucene.version}.jar"/>
<property name="lucene-misc.jar" value="lucene-misc-${lucene.version}.jar"/>
<property name="lucene-queries.jar" value="lucene-queries-${lucene.version}.jar"/>
<property name="lucene-queryparser.jar" value="lucene-queryparser-${lucene.version}.jar"/>
<property name="solr-core.jar" value="solr-core-${lucene.version}.jar"/>
<property name="solr-solrj.jar" value="solr-solrj-${lucene.version}.jar"/>
<property name="libdir" value="lib"/>
<property name="solrlibdir" value="${libdir}/solr"/>
<property name="file.reference.lucene-core.jar" value="${libdir}/${lucene-core.jar}"/>
<property name="file.reference.lucene-analyzers-common.jar" value="${libdir}/${lucene-analyzers-common.jar}"/>
<property name="file.reference.lucene-misc.jar" value="${libdir}/${lucene-misc.jar}"/>
<property name="file.reference.lucene-queries.jar" value="${libdir}/${lucene-queries.jar}"/>
<property name="file.reference.lucene-queryparser.jar" value="${libdir}/${lucene-queryparser.jar}"/>
<property name="file.reference.solr-core.jar" value="${solrlibdir}/${solr-core.jar}"/>
<property name="file.reference.solr-solrj.jar" value="${solrlibdir}/${solr-solrj.jar}"/>

<property name="mvn.repository" value="http://repo1.maven.org/maven2/"/>

<path id="plainlib.search.path">
<pathelement path="${libdir}"/>
<pathelement path="../${libdir}"/>
<pathelement path="${solrlibdir}"/>
<pathelement path="../${solrlibdir}"/>
</path>

<target name="-check-lucene" description="Check that lucene jar files are present">
<available file="${lucene-core.jar}" type="file" property="lucene-core.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-analyzers-common.jar}" type="file" property="lucene-analyzers-common.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-misc.jar}" type="file" property="lucene-misc.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-queries.jar}" type="file" property="lucene-queries.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-queryparser.jar}" type="file" property="lucene-queryparser.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${solr-core.jar}" type="file" property="solr-core.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${solr-solrj.jar}" type="file" property="solr-solrj.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<condition property="lucene_not_downloaded">
<not>
<and>
<isset property="lucene-core.jar.present"/>
<isset property="lucene-analyzers-common.jar.present"/>
<isset property="lucene-misc.jar.present"/>
<isset property="lucene-queries.jar.present"/>
<isset property="lucene-queryparser.jar.present"/>
<isset property="solr-core.jar.present"/>
<isset property="solr-solrj.jar.present"/>
</and>
</not>
</condition>
</target>

<target name="download-lucene" depends="-check-lucene" if="lucene_not_downloaded">
<delete file="${libdir}/lucene-*.jar"/>
<delete file="${solrlibdir}/solr-*.jar"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-core/${lucene.version}/${lucene-core.jar}"
dest="${file.reference.lucene-core.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-analyzers-common/${lucene.version}/${lucene-analyzers-common.jar}"
dest="${file.reference.lucene-analyzers-common.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-misc/${lucene.version}/${lucene-misc.jar}"
dest="${file.reference.lucene-misc.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-queries/${lucene.version}/${lucene-queries.jar}"
dest="${file.reference.lucene-queries.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-queryparser/${lucene.version}/${lucene-queryparser.jar}"
dest="${file.reference.lucene-queryparser.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/solr/solr-core/${lucene.version}/${solr-core.jar}"
dest="${file.reference.solr-core.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/solr/solr-solrj/${lucene.version}/${solr-solrj.jar}"
dest="${file.reference.solr-solrj.jar}" verbose="true" usetimestamp="true"/>
</target>

<target name="compile" depends="init">
<javac classpath="${classpath}"
sourcepath=""
Expand Down Expand Up @@ -64,7 +147,7 @@
excludes="org/getopt/luke/plugins,**/*.js,**/Thumbs.db">
<manifest>
<attribute name="Main-Class" value="org.getopt.luke.Luke"/>
<attribute name="Classpath" value="lucene-core-${build.ver}.jar;js.jar;lucene-misc-${build.ver}.jar"/>
<attribute name="Classpath" value="${lucene-core.jar};js.jar;${lucene-misc.jar}"/>
</manifest>
</jar>
<unjar dest="${build.dir}">
Expand All @@ -76,7 +159,7 @@
excludes="org/mozilla/,org/getopt/luke/plugins,**/*.js">
<manifest>
<attribute name="Main-Class" value="org.getopt.luke.Luke"/>
<attribute name="Classpath" value="lucene-core-${build.ver}.jar;lucene-misc-${build.ver}.jar"/>
<attribute name="Classpath" value="${lucene-core.jar};${lucene-misc.jar}"/>
</manifest>
</jar>
<unjar dest="${build.dir}">
Expand Down
Binary file removed lib/lucene-analyzers-common-4.10.1.jar
Binary file not shown.
Binary file removed lib/lucene-core-4.10.1.jar
Binary file not shown.
Binary file removed lib/lucene-misc-4.10.1.jar
Binary file not shown.
Binary file removed lib/lucene-queries-4.10.1.jar
Binary file not shown.
Binary file removed lib/lucene-queryparser-4.10.1.jar
Binary file not shown.
Binary file removed lib/solr/solr-core-4.10.1.jar
Binary file not shown.
Binary file removed lib/solr/solr-solrj-4.10.1.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
<compilation-unit>
<package-root>src</package-root>
<classpath mode="compile">lib/js.jar;lib/hadoop/commons-cli-1.2.jar;lib/hadoop/commons-codec-1.3.jar;lib/hadoop/commons-httpclient-3.0.1.jar;lib/hadoop/commons-logging-1.0.4.jar;lib/hadoop/commons-logging-api-1.0.4.jar;lib/hadoop/commons-net-1.4.1.jar;lib/hadoop/ehcache-1.6.0.jar;lib/hadoop/hadoop-0.20.2-core.jar;lib/hadoop/jets3t-0.6.1.jar;lib/hadoop/kfs-0.2.2.jar;lib/hadoop/log4j-1.2.15.jar;lib/hadoop/oro-2.0.8.jar;lib/hadoop/slf4j-api-1.4.3.jar;lib/hadoop/slf4j-log4j12-1.4.3.jar;lib/hadoop/xmlenc-0.52.jar;lib/lucene-analyzers-common-4.10.1.jar;lib/lucene-core-4.10.1.jar;lib/lucene-misc-4.10.1.jar;lib/lucene-queries-4.10.1.jar;lib/lucene-queryparser-4.10.1.jar;lib/solr/solr-core-4.10.1.jar;lib/solr/solr-solrj-4.10.1.jar</classpath>
<classpath mode="compile">lib/js.jar;lib/hadoop/commons-cli-1.2.jar;lib/hadoop/commons-codec-1.3.jar;lib/hadoop/commons-httpclient-3.0.1.jar;lib/hadoop/commons-logging-1.0.4.jar;lib/hadoop/commons-logging-api-1.0.4.jar;lib/hadoop/commons-net-1.4.1.jar;lib/hadoop/ehcache-1.6.0.jar;lib/hadoop/hadoop-0.20.2-core.jar;lib/hadoop/jets3t-0.6.1.jar;lib/hadoop/kfs-0.2.2.jar;lib/hadoop/log4j-1.2.15.jar;lib/hadoop/oro-2.0.8.jar;lib/hadoop/slf4j-api-1.4.3.jar;lib/hadoop/slf4j-log4j12-1.4.3.jar;lib/hadoop/xmlenc-0.52.jar;lib/lucene-analyzers-common-4.10.2.jar;lib/lucene-core-4.10.2.jar;lib/lucene-misc-4.10.2.jar;lib/lucene-queries-4.10.2.jar;lib/lucene-queryparser-4.10.2.jar;lib/solr/solr-core-4.10.2.jar;lib/solr/solr-solrj-4.10.2.jar</classpath>
<source-level>1.7</source-level>
</compilation-unit>
</java-data>
Expand Down

0 comments on commit dddfaf2

Please sign in to comment.