LUCENE-908:

- Improves content of MANIFEST file and makes it customizable for the contribs.
- Adds SNOWBALL-LICENSE.txt to META-INF of the snowball jar 
- lucli jar now contains LICENSE.txt and NOTICE.txt.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@545010 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Busch 2007-06-07 00:48:32 +00:00
parent 35b5ace0ab
commit 731fb3a228
7 changed files with 151 additions and 25 deletions

View File

@ -271,6 +271,11 @@ Build
7. LUCENE-909: Demo targets for running the demo. (Doron Cohen)
9. LUCENE-908: Improves content of MANIFEST file and makes it customizable
for the contribs. Adds SNOWBALL-LICENSE.txt to META-INF of the snowball
jar and makes sure that the lucli jar contains LICENSE.txt and NOTICE.txt.
(Chris Hostetter, Michael Busch)
======================= Release 2.1.0 2007-02-14 =======================
Changes in runtime behavior

View File

@ -93,6 +93,23 @@
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"/>
@ -106,6 +123,23 @@
<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"/>
@ -113,6 +147,7 @@
</war>
</target>
<!-- ================================================================== -->
<!-- B U I L D D E M O -->
<!-- ================================================================== -->

View File

@ -45,6 +45,10 @@
<property name="junit.includes" value="**/Test*.java,**/*Test.java"/>
<property name="junit.excludes" value=""/>
<patternset id="metainf.includes">
<exclude name="**/*"/>
</patternset>
<condition property="build-1-5-contrib">
<equals arg1="1.5" arg2="${ant.java.version}" />
</condition>
@ -146,27 +150,71 @@
<target name="jar-core" depends="compile-core"
description="Packages the JAR file">
<jar
destfile="${build.dir}/${final.name}.jar"
basedir="${build.dir}/classes/java">
<manifest>
<attribute name="Created-By" value="Apache Lucene Java"/>
<section name="org/apache/lucene/">
<attribute name="Specification-Title" value="Lucene Search Engine"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Lucene"/>
<attribute name="Implementation-Title" value="org.apache.lucene"/>
<attribute name="Implementation-Version" value="build ${DSTAMP}"/>
<attribute name="Implementation-Vendor" value="Lucene"/>
</section>
</manifest>
<metainf dir="${common.dir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
</metainf>
</jar>
<jarify />
</target>
<macrodef name="jarify" description="Builds a JAR file">
<attribute name="title" default="Lucene Search Engine: ${ant.project.name}" />
<element name="manifest-attributes" optional="yes"/>
<sequential>
<!-- If possible, include the svnversion -->
<exec dir="." executable="svnversion"
outputproperty="svnversion" failifexecutionfails="false">
<arg line="."/>
</exec>
<jar
destfile="${build.dir}/${final.name}.jar"
basedir="${build.dir}/classes/java">
<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>
<metainf dir="${common.dir}">
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
</metainf>
<metainf dir=".">
<patternset refid="metainf.includes"/>
</metainf>
</jar>
</sequential>
</macrodef>
<target name="compile-test" depends="compile-core">
<compile
srcdir="src/test"
@ -344,3 +392,4 @@

View File

@ -1,2 +0,0 @@
Main-Class: lucli.Lucli
Class-Path: lib/jline.jar lib/lucene.jar

View File

@ -22,9 +22,11 @@
<import file="../contrib-build.xml"/>
<target name="jar" depends="compile" description="Create JAR">
<jar jarfile="${build.dir}/${final.name}.jar"
basedir="${build.dir}/classes/java"
manifest="META-INF/MANIFEST.MF"
/>
<jarify>
<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>

View File

@ -13,6 +13,9 @@
<property name="snowball.root" value="snowball/website"/>
<property name="bin.dir" location="bin"/>
<patternset id="metainf.includes">
<include name="SNOWBALL-LICENSE.txt"/>
</patternset>
<!-- ====================================================== -->
<!-- Download Snowball code -->

View File

@ -50,6 +50,23 @@
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"/>
@ -64,6 +81,23 @@
<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"/>