Skip to content

Apache Lucene open-source search software

- LUCENE-908: Improvements and simplifications for how the MANIFEST file and the META-INF dir are created. - LUCENE-935: Various improvements for the maven artifacts. Now the artifacts also include the sources as .jar files.

Michael Busch9c2a036db3b6
diff --git a/CHANGES.txt b/CHANGES.txt
index 98f3270964a..bfd13ac194e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -135,6 +135,13 @@ Documentation
Build
+ 1. LUCENE-908: Improvements and simplifications for how the MANIFEST
+ file and the META-INF dir are created. (Michael Busch)
+
+ 2. LUCENE-935: Various improvements for the maven artifacts. Now the
+ artifacts also include the sources as .jar files. (Michael Busch)
+
+
Test Cases
======================= Release 2.2.0 2007-06-19 =======================
diff --git a/build.xml b/build.xml
index ab8de8b189b..414a4d21165 100644
--- a/build.xml
+++ b/build.xml
@@ -106,62 +106,51 @@
<!-- ================================================================== -->
<target name="jar-demo" depends="compile-demo">
- <jar
- destfile="${build.dir}/${demo.name}.jar"
- basedir="${build.dir}/classes/demo"
- excludes="**/*.java">
- <manifest>
- <attribute name="Specification-Title" value="Lucene Search Engine: demos"/>
- <!-- spec version must match "digit+{.digit+}*" -->
- <attribute name="Specification-Version" value="${version}"/>
- <attribute name="Specification-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="Implementation-Title" value="org.apache.lucene"/>
- <!-- impl version can be any string -->
- <attribute name="Implementation-Version"
- value="${version}"/>
- <attribute name="Implementation-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="X-Compile-Source-JDK"
- value="${javac.source}"/>
- <attribute name="X-Compile-Target-JDK"
- value="${javac.target}"/>
- </manifest>
- <metainf dir="${common.dir}">
- <include name="LICENSE.txt"/>
- <include name="NOTICE.txt"/>
- </metainf>
- </jar>
+ <sequential>
+ <build-manifest title="Lucene Search Engine: demos"/>
+ <jar
+ destfile="${build.dir}/${demo.name}.jar"
+ basedir="${build.dir}/classes/demo"
+ excludes="**/*.java"
+ manifest="${manifest.file}">
+ <metainf dir="${common.dir}">
+ <include name="LICENSE.txt"/>
+ <include name="NOTICE.txt"/>
+ </metainf>
+ </jar>
+ </sequential>
+ </target>
+
+ <target name="jar-demo-src" depends="compile-demo">
+ <sequential>
+ <build-manifest title="Lucene Search Engine: demos"/>
+ <jar
+ destfile="${build.dir}/${demo.name}-src.jar"
+ basedir="src/demo"
+ manifest="${manifest.file}">
+ <metainf dir="${common.dir}">
+ <include name="LICENSE.txt"/>
+ <include name="NOTICE.txt"/>
+ </metainf>
+ </jar>
+ </sequential>
</target>
<target name="war-demo" depends="jar-core,jar-demo">
- <war destfile="${build.dir}/${demo.war.name}.war"
- webxml="src/jsp/WEB-INF/web.xml">
- <fileset dir="src/jsp" excludes="WEB-INF/web.xml"/>
- <lib dir="${build.dir}" includes="${demo.name}.jar"/>
- <lib dir="${build.dir}" includes="${final.name}.jar"/>
- <manifest>
- <attribute name="Specification-Title" value="Lucene Search Engine: demos"/>
- <!-- spec version must match "digit+{.digit+}*" -->
- <attribute name="Specification-Version" value="${version}"/>
- <attribute name="Specification-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="Implementation-Title" value="org.apache.lucene"/>
- <!-- impl version can be any string -->
- <attribute name="Implementation-Version"
- value="${version}"/>
- <attribute name="Implementation-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="X-Compile-Source-JDK"
- value="${javac.source}"/>
- <attribute name="X-Compile-Target-JDK"
- value="${javac.target}"/>
- </manifest>
- <metainf dir="${common.dir}">
- <include name="LICENSE.txt"/>
- <include name="NOTICE.txt"/>
- </metainf>
- </war>
+ <sequential>
+ <build-manifest title="Lucene Search Engine: demos"/>
+ <war destfile="${build.dir}/${demo.war.name}.war"
+ webxml="src/jsp/WEB-INF/web.xml"
+ manifest="${manifest.file}">
+ <fileset dir="src/jsp" excludes="WEB-INF/web.xml"/>
+ <lib dir="${build.dir}" includes="${demo.name}.jar"/>
+ <lib dir="${build.dir}" includes="${final.name}.jar"/>
+ <metainf dir="${common.dir}">
+ <include name="LICENSE.txt"/>
+ <include name="NOTICE.txt"/>
+ </metainf>
+ </war>
+ </sequential>
</target>
@@ -361,12 +350,24 @@
<target name="dist-all" depends="dist, dist-src"/>
- <target name="generate-maven-artifacts" depends="maven.ant.tasks-check, package">
+ <target name="generate-maven-artifacts" depends="maven.ant.tasks-check, package, jar-src, jar-demo-src">
<sequential>
- <m2-deploy pom.xml="lucene-parent-pom.xml"/>
- <m2-deploy pom.xml="lucene-core-pom.xml"/>
- <m2-deploy pom.xml="lucene-demos-pom.xml"/>
- <m2-deploy pom.xml="lucene-contrib-pom.xml"/>
+ <m2-deploy pom.xml="lucene-parent-pom.xml.template"/>
+ <m2-deploy pom.xml="lucene-core-pom.xml.template">
+ <artifact-attachments>
+ <attach file="${build.dir}/${final.name}-src.jar"
+ classifier="sources"/>
+ </artifact-attachments>
+ </m2-deploy>
+
+ <m2-deploy pom.xml="lucene-demos-pom.xml.template">
+ <artifact-attachments>
+ <attach file="${build.dir}/${demo.name}-src.jar"
+ classifier="sources"/>
+ </artifact-attachments>
+ </m2-deploy>
+
+ <m2-deploy pom.xml="lucene-contrib-pom.xml.template"/>
<contrib-crawl target="dist-maven"/>
<!-- do md5 checksums -->
<checksum forceOverwrite="yes" fileext=".md5">
diff --git a/common-build.xml b/common-build.xml
index 35ba970c6de..94de92a4e43 100644
--- a/common-build.xml
+++ b/common-build.xml
@@ -65,13 +65,7 @@
<property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
<property name="junit.excludes" value=""/>
- <patternset id="metainf.includes">
- <!-- use an explicit include to prevent expensive walking of subdirs
- that default include triggers
- -->
- <include name="FIND_NOTHING"/>
- <exclude name="**/*"/>
- </patternset>
+ <property name="manifest.file" location="${common.dir}/build/MANIFEST.MF"/>
<condition property="build-1-5-contrib">
<equals arg1="1.5" arg2="${ant.java.version}" />
@@ -220,9 +214,9 @@
<target name="jar-core" depends="compile-core"
description="Packages the JAR file">
- <jarify />
+ <jarify/>
</target>
-
+
<target name="maven.ant.tasks-check">
<fail unless="maven.ant.tasks.present">
##################################################################
@@ -233,9 +227,10 @@
</fail>
</target>
- <property name="pom.xml" value="pom.xml"/>
+ <property name="pom.xml" value="pom.xml.template"/>
<macrodef name="m2-deploy" description="Builds a Maven artifact">
+ <element name="artifact-attachments" optional="yes"/>
<attribute name="pom.xml" default="${pom.xml}"/>
<sequential>
<copy file="@{pom.xml}" tofile="${build.dir}/@{pom.xml}">
@@ -243,73 +238,67 @@
<filter token="version" value="${version}"/>
</filterset>
</copy>
+
<artifact:pom id="maven.project" file="${build.dir}/@{pom.xml}" />
- <artifact:install file="${build.dir}/${maven.project.build.finalName}.jar">
- <localRepository location="${maven.dist.dir}"/>
+ <artifact:deploy file="${build.dir}/${maven.project.build.finalName}.jar">
+ <artifact-attachments/>
+ <remoteRepository url="file://${maven.dist.dir}"/>
<pom refid="maven.project"/>
- </artifact:install>
+ </artifact:deploy>
</sequential>
</macrodef>
+
+ <macrodef name="build-manifest" description="Builds a manifest file">
+ <attribute name="title" default="Lucene Search Engine: ${ant.project.name}" />
+ <sequential>
+ <manifest file="${manifest.file}">
+ <attribute name="Specification-Title" value="@{title}"/>
+ <!-- spec version must match "digit+{.digit+}*" -->
+ <attribute name="Specification-Version" value="${version}"/>
+ <attribute name="Specification-Vendor"
+ value="The Apache Software Foundation"/>
+ <attribute name="Implementation-Title" value="org.apache.lucene"/>
+ <!-- impl version can be any string -->
+ <attribute name="Implementation-Version"
+ value="${version} ${svnversion} - ${user.name} - ${DSTAMP} ${TSTAMP}"/>
+ <attribute name="Implementation-Vendor"
+ value="The Apache Software Foundation"/>
+ <attribute name="X-Compile-Source-JDK"
+ value="${javac.source}"/>
+ <attribute name="X-Compile-Target-JDK"
+ value="${javac.target}"/>
+ </manifest>
+ </sequential>
+ </macrodef>
+
<macrodef name="jarify" description="Builds a JAR file">
- <attribute name="title" default="Lucene Search Engine: ${ant.project.name}" />
+ <attribute name="basedir" default="${build.dir}/classes/java"/>
+ <attribute name="destfile" default="${build.dir}/${final.name}.jar"/>
<element name="manifest-attributes" optional="yes"/>
+ <element name="metainf-includes" optional="yes"/>
<sequential>
<!-- If possible, include the svnversion -->
<exec dir="." executable="svnversion"
outputproperty="svnversion" failifexecutionfails="false">
<arg line="."/>
</exec>
-
+
+ <build-manifest/>
+
<jar
- destfile="${build.dir}/${final.name}.jar"
- basedir="${build.dir}/classes/java">
+ destfile="@{destfile}"
+ basedir="@{basedir}"
+ manifest="${manifest.file}">
<manifest>
- <!--
- 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
- http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Package.html
- http://java.sun.com/j2se/1.5.0/docs/api/java/util/jar/package-summary.html
- http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
- -->
- <!-- Don't set 'Manifest-Version' it identifies the version of the
- manifest file format, and should allways be 1.0 (the default)
-
- Don't set 'Created-by' attribute, it's purpose is
- to identify the version of java used to build the jar,
- which ant will do by default.
-
- Ant will happily override these with bogus strings if you
- tell it to, so don't.
-
- NOTE: we don't use section info because all of our manifest data
- applies to the entire jar/war ... no package specific info.
- -->
- <attribute name="Specification-Title" value="@{title}"/>
- <!-- spec version must match "digit+{.digit+}*" -->
- <attribute name="Specification-Version" value="${version}"/>
- <attribute name="Specification-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="Implementation-Title" value="org.apache.lucene"/>
- <!-- impl version can be any string -->
- <attribute name="Implementation-Version"
- value="${version} ${svnversion} - ${user.name} - ${DSTAMP} ${TSTAMP}"/>
- <attribute name="Implementation-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="X-Compile-Source-JDK"
- value="${javac.source}"/>
- <attribute name="X-Compile-Target-JDK"
- value="${javac.target}"/>
- <manifest-attributes/>
+ <manifest-attributes/>
</manifest>
<metainf dir="${common.dir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
</metainf>
- <metainf dir=".">
- <patternset refid="metainf.includes"/>
- </metainf>
+ <metainf-includes/>
</jar>
</sequential>
</macrodef>
@@ -445,9 +434,7 @@
</target>
<target name="jar-src" depends="init">
- <jar destfile="${build.dir}/${final.name}-src.jar">
- <fileset dir="." includes="src/"/>
- </jar>
+ <jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-src.jar"/>
</target>
<target name="default" depends="jar-core"/>
@@ -501,3 +488,4 @@
+
diff --git a/contrib/analyzers/pom.xml b/contrib/analyzers/pom.xml.template
similarity index 100%
rename from contrib/analyzers/pom.xml
rename to contrib/analyzers/pom.xml.template
diff --git a/contrib/ant/pom.xml b/contrib/ant/pom.xml.template
similarity index 100%
rename from contrib/ant/pom.xml
rename to contrib/ant/pom.xml.template
diff --git a/contrib/benchmark/pom.xml b/contrib/benchmark/pom.xml.template
similarity index 100%
rename from contrib/benchmark/pom.xml
rename to contrib/benchmark/pom.xml.template
diff --git a/contrib/contrib-build.xml b/contrib/contrib-build.xml
index 992bb3f611d..b869cf24b13 100644
--- a/contrib/contrib-build.xml
+++ b/contrib/contrib-build.xml
@@ -24,7 +24,7 @@
<property name="build.dir" location="../../build/contrib/${ant.project.name}"/>
<property name="dist.dir" location="../../dist/contrib/${ant.project.name}"/>
<property name="maven.dist.dir" location="../../dist/maven"/>
-
+
<import file="../common-build.xml"/>
<property name="lucene.jar" location="${common.dir}/build/lucene-core-${version}.jar"/>
@@ -75,11 +75,16 @@
property="pom.xml.present">
</available>
- <target name="dist-maven" if="pom.xml.present" depends="compile-core">
- <artifact:pom file="${common.dir}/build/lucene-parent-pom.xml" id="maven.project"/>
- <artifact:pom file="${common.dir}/build/lucene-core-pom.xml" id="maven.project"/>
- <artifact:pom file="${common.dir}/build/lucene-contrib-pom.xml" id="maven.project"/>
- <m2-deploy/>
+ <target name="dist-maven" if="pom.xml.present" depends="compile-core, jar-src">
+ <sequential>
+ <jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-sources.jar"/>
+ <m2-deploy>
+ <artifact-attachments>
+ <attach file="${build.dir}/${final.name}-src.jar"
+ classifier="sources"/>
+ </artifact-attachments>
+ </m2-deploy>
+ </sequential>
</target>
</project>
diff --git a/contrib/db/bdb-je/pom.xml b/contrib/db/bdb-je/pom.xml.template
similarity index 100%
rename from contrib/db/bdb-je/pom.xml
rename to contrib/db/bdb-je/pom.xml.template
diff --git a/contrib/db/bdb/pom.xml b/contrib/db/bdb/pom.xml.template
similarity index 100%
rename from contrib/db/bdb/pom.xml
rename to contrib/db/bdb/pom.xml.template
diff --git a/contrib/highlighter/pom.xml b/contrib/highlighter/pom.xml.template
similarity index 100%
rename from contrib/highlighter/pom.xml
rename to contrib/highlighter/pom.xml.template
diff --git a/contrib/lucli/build.xml b/contrib/lucli/build.xml
index 34e93e5d8b9..61837dee15f 100644
--- a/contrib/lucli/build.xml
+++ b/contrib/lucli/build.xml
@@ -45,5 +45,14 @@
<attribute name="Class-Path" value="lib/jline.jar lib/lucene.jar" />
</manifest-attributes>
</jarify>
- </target>
+ </target>
+
+ <target name="jar-src" depends="init">
+ <jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-src.jar">
+ <manifest-attributes>
+ <attribute name="Main-Class" value="lucli.Lucli" />
+ <attribute name="Class-Path" value="lib/jline.jar lib/lucene.jar" />
+ </manifest-attributes>
+ </jarify>
+ </target>
</project>
diff --git a/contrib/lucli/pom.xml b/contrib/lucli/pom.xml.template
similarity index 100%
rename from contrib/lucli/pom.xml
rename to contrib/lucli/pom.xml.template
diff --git a/contrib/memory/pom.xml b/contrib/memory/pom.xml.template
similarity index 100%
rename from contrib/memory/pom.xml
rename to contrib/memory/pom.xml.template
diff --git a/contrib/miscellaneous/pom.xml b/contrib/miscellaneous/pom.xml.template
similarity index 100%
rename from contrib/miscellaneous/pom.xml
rename to contrib/miscellaneous/pom.xml.template
diff --git a/contrib/queries/pom.xml b/contrib/queries/pom.xml.template
similarity index 100%
rename from contrib/queries/pom.xml
rename to contrib/queries/pom.xml.template
diff --git a/contrib/regex/pom.xml b/contrib/regex/pom.xml.template
similarity index 100%
rename from contrib/regex/pom.xml
rename to contrib/regex/pom.xml.template
diff --git a/contrib/similarity/pom.xml b/contrib/similarity/pom.xml.template
similarity index 100%
rename from contrib/similarity/pom.xml
rename to contrib/similarity/pom.xml.template
diff --git a/contrib/snowball/build.xml b/contrib/snowball/build.xml
index a75c033a311..154c355780d 100644
--- a/contrib/snowball/build.xml
+++ b/contrib/snowball/build.xml
@@ -30,10 +30,28 @@
<property name="snowball.root" value="snowball/website"/>
<property name="bin.dir" location="bin"/>
- <patternset id="metainf.includes">
- <include name="SNOWBALL-LICENSE.txt"/>
- </patternset>
+ <target name="jar" depends="compile" description="Create JAR">
+ <jarify>
+ <metainf-includes>
+ <metainf dir=".">
+ <include name="SNOWBALL-LICENSE.txt"/>
+ </metainf>
+ </metainf-includes>
+ </jarify>
+ </target>
+
+ <target name="jar-src" depends="init"
+ description="Packages the sources as JAR file">
+ <jarify basedir="${src.dir}" destfile="${build.dir}/${final.name}-src.jar">
+ <metainf-includes>
+ <metainf dir=".">
+ <include name="SNOWBALL-LICENSE.txt"/>
+ </metainf>
+ </metainf-includes>
+ </jarify>
+ </target>
+
<!-- ====================================================== -->
<!-- Download Snowball code -->
<!-- ====================================================== -->
diff --git a/contrib/snowball/pom.xml b/contrib/snowball/pom.xml.template
similarity index 100%
rename from contrib/snowball/pom.xml
rename to contrib/snowball/pom.xml.template
diff --git a/contrib/spellchecker/pom.xml b/contrib/spellchecker/pom.xml.template
similarity index 100%
rename from contrib/spellchecker/pom.xml
rename to contrib/spellchecker/pom.xml.template
diff --git a/contrib/surround/pom.xml b/contrib/surround/pom.xml.template
similarity index 100%
rename from contrib/surround/pom.xml
rename to contrib/surround/pom.xml.template
diff --git a/contrib/swing/pom.xml b/contrib/swing/pom.xml.template
similarity index 100%
rename from contrib/swing/pom.xml
rename to contrib/swing/pom.xml.template
diff --git a/contrib/wordnet/pom.xml b/contrib/wordnet/pom.xml.template
similarity index 100%
rename from contrib/wordnet/pom.xml
rename to contrib/wordnet/pom.xml.template
diff --git a/contrib/xml-query-parser/pom.xml b/contrib/xml-query-parser/pom.xml.template
similarity index 100%
rename from contrib/xml-query-parser/pom.xml
rename to contrib/xml-query-parser/pom.xml.template
diff --git a/lucene-contrib-pom.xml b/lucene-contrib-pom.xml.template
similarity index 100%
rename from lucene-contrib-pom.xml
rename to lucene-contrib-pom.xml.template
diff --git a/lucene-core-pom.xml b/lucene-core-pom.xml.template
similarity index 100%
rename from lucene-core-pom.xml
rename to lucene-core-pom.xml.template
diff --git a/lucene-demos-pom.xml b/lucene-demos-pom.xml.template
similarity index 100%
rename from lucene-demos-pom.xml
rename to lucene-demos-pom.xml.template
diff --git a/lucene-parent-pom.xml b/lucene-parent-pom.xml.template
similarity index 93%
rename from lucene-parent-pom.xml
rename to lucene-parent-pom.xml.template
index ee44a077f2a..a4e4616b4ac 100644
--- a/lucene-parent-pom.xml
+++ b/lucene-parent-pom.xml.template
@@ -20,7 +20,11 @@
specific language governing permissions and limitations
under the License.
-->
-
+ <parent>
+ <groupId>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>4</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-parent</artifactId>
diff --git a/src/demo/demo-build.template b/src/demo/demo-build.template
index 5aa099d8ccf..aba681cfcb1 100644
--- a/src/demo/demo-build.template
+++ b/src/demo/demo-build.template
@@ -31,6 +31,8 @@
<property name="demo.name" value="lucene-demos-${version}"/>
<property name="demo.war.name" value="luceneweb"/>
+ <property name="manifest.file" location="${build.dir}/MANIFEST.MF"/>
+
<!-- Build classpath -->
<path id="classpath">
<pathelement location="${common.dir}/${core.name}.jar"/>
@@ -63,63 +65,37 @@
<target name="jar-demo" depends="compile-demo"
description="Build demo jar file">
- <jar
- destfile="${demo.name}.jar"
- basedir="${build.dir}/classes/demo"
- excludes="**/*.java">
- <manifest>
- <attribute name="Specification-Title" value="Lucene Search Engine: demos"/>
- <!-- spec version must match "digit+{.digit+}*" -->
- <attribute name="Specification-Version" value="${version}"/>
- <attribute name="Specification-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="Implementation-Title" value="org.apache.lucene"/>
- <!-- impl version can be any string -->
- <attribute name="Implementation-Version"
- value="${version}"/>
- <attribute name="Implementation-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="X-Compile-Source-JDK"
- value="${javac.source}"/>
- <attribute name="X-Compile-Target-JDK"
- value="${javac.target}"/>
- </manifest>
- <metainf dir="${common.dir}">
- <include name="LICENSE.txt"/>
- <include name="NOTICE.txt"/>
- </metainf>
- </jar>
+ <sequential>
+ <build-manifest/>
+ <jar
+ destfile="${demo.name}.jar"
+ basedir="${build.dir}/classes/demo"
+ excludes="**/*.java"
+ manifest="${manifest.file}">
+ <metainf dir="${common.dir}">
+ <include name="LICENSE.txt"/>
+ <include name="NOTICE.txt"/>
+ </metainf>
+ </jar>
+ </sequential>
</target>
<target name="war-demo" depends="jar-demo"
description="Build demo war file">
- <war destfile="${demo.war.name}.war"
- webxml="src/jsp/WEB-INF/web.xml">
- <fileset dir="src/jsp" excludes="WEB-INF/web.xml"/>
- <lib dir="." includes="${demo.name}.jar"/>
- <lib dir="." includes="${core.name}.jar"/>
- <manifest>
- <attribute name="Specification-Title" value="Lucene Search Engine: demos"/>
- <!-- spec version must match "digit+{.digit+}*" -->
- <attribute name="Specification-Version" value="${version}"/>
- <attribute name="Specification-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="Implementation-Title" value="org.apache.lucene"/>
- <!-- impl version can be any string -->
- <attribute name="Implementation-Version"
- value="${version}"/>
- <attribute name="Implementation-Vendor"
- value="The Apache Software Foundation"/>
- <attribute name="X-Compile-Source-JDK"
- value="${javac.source}"/>
- <attribute name="X-Compile-Target-JDK"
- value="${javac.target}"/>
- </manifest>
- <metainf dir="${common.dir}">
- <include name="LICENSE.txt"/>
- <include name="NOTICE.txt"/>
- </metainf>
- </war>
+ <sequential>
+ <build-manifest/>
+ <war destfile="${demo.war.name}.war"
+ webxml="src/jsp/WEB-INF/web.xml"
+ manifest="${manifest.file}">
+ <fileset dir="src/jsp" excludes="WEB-INF/web.xml"/>
+ <lib dir="." includes="${demo.name}.jar"/>
+ <lib dir="." includes="${core.name}.jar"/>
+ <metainf dir="${common.dir}">
+ <include name="LICENSE.txt"/>
+ <include name="NOTICE.txt"/>
+ </metainf>
+ </war>
+ </sequential>
</target>
<!-- ================================================================== -->
@@ -210,6 +186,29 @@
<!--+
| M A C R O S
+-->
+
+ <macrodef name="build-manifest" description="Builds a manifest file">
+ <sequential>
+ <manifest file="${manifest.file}">
+ <attribute name="Specification-Title" value="Lucene Search Engine: demos"/>
+ <!-- spec version must match "digit+{.digit+}*" -->
+ <attribute name="Specification-Version" value="${version}"/>
+ <attribute name="Specification-Vendor"
+ value="The Apache Software Foundation"/>
+ <attribute name="Implementation-Title" value="org.apache.lucene"/>
+ <!-- impl version can be any string -->
+ <attribute name="Implementation-Version"
+ value="${version}"/>
+ <attribute name="Implementation-Vendor"
+ value="The Apache Software Foundation"/>
+ <attribute name="X-Compile-Source-JDK"
+ value="${javac.source}"/>
+ <attribute name="X-Compile-Target-JDK"
+ value="${javac.target}"/>
+ </manifest>
+ </sequential>
+ </macrodef>
+
<macrodef name="compile">
<attribute name="srcdir"/>
<attribute name="destdir"/>