Skip to content

Apache Lucene open-source search software

1. Moving solr-jar to common-build.xml so it can be used by contribs 2. Adding correct manifest information to DataImportHandler jar

Shalin Shekhar Mangarb25d5b3a33cf
diff --git a/build.xml b/build.xml
index ae9231933f0..eafc2d37c3c 100644
--- a/build.xml
+++ b/build.xml
@@ -46,25 +46,6 @@
<isset property="clover.present"/>
</and>
</condition>
-
- <!-- Macro for building Jars -->
- <macrodef name="solr-jar">
- <attribute name="destfile" />
- <attribute name="basedir" />
- <attribute name="includes" default="org/apache/**" />
- <attribute name="manifest" default="${dest}/META-INF/MANIFEST.MF" />
- <element name="nested" optional="true" implicit="true" />
- <sequential>
- <jar destfile="@{destfile}"
- basedir="@{basedir}"
- includes="@{includes}"
- filesetmanifest="skip"
- manifest="@{manifest}">
- <metainf dir="${basedir}" includes="LICENSE.txt,NOTICE.txt"/>
- <nested />
- </jar>
- </sequential>
- </macrodef>
<!-- Default target: usage. Prints out instructions. -->
<target name="usage"
diff --git a/common-build.xml b/common-build.xml
index 7347b2a56c3..0548f4d869b 100644
--- a/common-build.xml
+++ b/common-build.xml
@@ -118,6 +118,25 @@
</javac>
</sequential>
</macrodef>
+
+ <!-- Macro for building Jars -->
+ <macrodef name="solr-jar">
+ <attribute name="destfile" />
+ <attribute name="basedir" />
+ <attribute name="includes" default="org/apache/**" />
+ <attribute name="manifest" default="${common.dir}/${dest}/META-INF/MANIFEST.MF" />
+ <element name="nested" optional="true" implicit="true" />
+ <sequential>
+ <jar destfile="@{destfile}"
+ basedir="@{basedir}"
+ includes="@{includes}"
+ filesetmanifest="skip"
+ manifest="@{manifest}">
+ <metainf dir="${common.dir}" includes="LICENSE.txt,NOTICE.txt"/>
+ <nested />
+ </jar>
+ </sequential>
+ </macrodef>
<!-- Macro for building checksum files
This is only needed until the "format" option is supported
@@ -214,13 +233,13 @@
<!-- Creates a Manifest file for Jars and WARs -->
<target name="make-manifest">
<!-- If possible, include the svnversion -->
- <exec dir="." executable="svnversion" outputproperty="svnversion" failifexecutionfails="false">
+ <exec dir="${common.dir}" executable="svnversion" outputproperty="svnversion" failifexecutionfails="false">
<arg line="."/>
</exec>
<!-- no description, don't advertise -->
- <mkdir dir="${dest}/META-INF/" />
- <manifest mode="replace" file="${dest}/META-INF/MANIFEST.MF">
+ <mkdir dir="${common.dir}/${dest}/META-INF/" />
+ <manifest mode="replace" file="${common.dir}/${dest}/META-INF/MANIFEST.MF">
<!--
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest
http://java.sun.com/j2se/1.5.0/docs/guide/versioning/spec/versioning2.html
diff --git a/contrib/dataimporthandler/build.xml b/contrib/dataimporthandler/build.xml
index 24edb0fb243..81ded3b821a 100644
--- a/contrib/dataimporthandler/build.xml
+++ b/contrib/dataimporthandler/build.xml
@@ -60,8 +60,9 @@
</solr-javac>
</target>
- <target name="build" depends="compile">
- <jar destfile="target/${fullnamever}.jar" basedir="target/classes" />
+ <target name="build" depends="compile, make-manifest">
+ <solr-jar destfile="target/${fullnamever}.jar" basedir="target/classes"
+ manifest="${common.dir}/${dest}/META-INF/MANIFEST.MF" />
</target>
<target name="compileTests" depends="compile">