浏览代码

ZOOKEEPER-749 (OSGi metadata not included in binary only jar) and ZOOKEEPER-750 (move maven artifacts into dist-maven subdir of the release (package target))

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@939172 13f79535-47bb-0310-9956-ffa450edef68
Henry Robinson 15 年之前
父节点
当前提交
2e4157ccb3
共有 3 个文件被更改,包括 48 次插入15 次删除
  1. 6 0
      CHANGES.txt
  2. 9 5
      README.txt
  3. 33 10
      build.xml

+ 6 - 0
CHANGES.txt

@@ -35,6 +35,12 @@ BUGFIXES:
   ZOOKEEPER-754. numerous misspellings "succesfully"
   ZOOKEEPER-754. numerous misspellings "succesfully"
   (Savu Andrei via phunt)
   (Savu Andrei via phunt)
 
 
+  ZOOKEEPER-749. OSGi metadata not included in binary only jar (phunt
+  via henryr)
+
+  ZOOKEEPER-750. move maven artifacts into "dist-maven" subdir of the
+  release (package target) (phunt via henryr)
+
 IMPROVEMENTS:
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)
   (phunt via mahadev)

+ 9 - 5
README.txt

@@ -11,7 +11,7 @@ Full documentation for this release can also be found in docs/index.html
 ---------------------------
 ---------------------------
 Packaging/release artifacts
 Packaging/release artifacts
 
 
-The release artifact contains the following jar files:
+The release artifact contains the following jar file at the toplevel:
 
 
 zookeeper-<version>.jar         - legacy jar file which contains all classes
 zookeeper-<version>.jar         - legacy jar file which contains all classes
                                   and source files. Prior to version 3.3.0 this
                                   and source files. Prior to version 3.3.0 this
@@ -20,13 +20,17 @@ zookeeper-<version>.jar         - legacy jar file which contains all classes
                                   debugging purposes) however is also larger as
                                   debugging purposes) however is also larger as
                                   a result
                                   a result
 
 
-zookeeper-<version>-bin.jar     - contains only class (*.class) files
+The release artifact contains the following jar files in "dist-maven" directory:
+
+zookeeper-<version>.jar         - bin (binary) jar - contains only class (*.class) files
 zookeeper-<version>-sources.jar - contains only src (*.java) files
 zookeeper-<version>-sources.jar - contains only src (*.java) files
 zookeeper-<version>-javadoc.jar - contains only javadoc files
 zookeeper-<version>-javadoc.jar - contains only javadoc files
 
 
-The bin/src/javadoc jars were added specifically to support Maven/Ivy which have 
+These bin/src/javadoc jars were added specifically to support Maven/Ivy which have 
 the ability to pull these down automatically as part of your build process. 
 the ability to pull these down automatically as part of your build process. 
 The content of the legacy jar and the bin+sources jar are the same.
 The content of the legacy jar and the bin+sources jar are the same.
 
 
-As of version 3.3.0 bin/sources/javadoc jars are deployed to the Apache Maven 
-repository: http://people.apache.org/repo/m2-ibiblio-rsync-repository/
+As of version 3.3.0 bin/sources/javadoc jars contained in dist-maven directory
+are deployed to the Apache Maven repository after the release has been accepted
+by Apache:
+  http://people.apache.org/repo/m2-ibiblio-rsync-repository/

+ 33 - 10
build.xml

@@ -87,6 +87,7 @@
     <property name="javadoc.packages" value="org.apache.*" />
     <property name="javadoc.packages" value="org.apache.*" />
 
 
     <property name="dist.dir" value="${build.dir}/${final.name}"/>
     <property name="dist.dir" value="${build.dir}/${final.name}"/>
+    <property name="dist.maven.dir" value="${dist.dir}/dist-maven"/>
 
 
     <property name="clover.home" location="${env.CLOVER_HOME}"/>
     <property name="clover.home" location="${env.CLOVER_HOME}"/>
     <property name="clover.jar" location="${clover.home}/lib/clover.jar" />
     <property name="clover.jar" location="${clover.home}/lib/clover.jar" />
@@ -506,6 +507,19 @@
                 <attribute name="Implementation-Title" value="org.apache.zookeeper"/>
                 <attribute name="Implementation-Title" value="org.apache.zookeeper"/>
                 <attribute name="Implementation-Version" value="${revision}"/> 
                 <attribute name="Implementation-Version" value="${revision}"/> 
                 <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
                 <attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
+            	
+            	<!-- The following are OSGi manifest headers -->
+            	<!-- currently hardcoded, when things get more complicated we could use BND 
+            	http://www.aqute.biz/Code/Bnd to generate them -->
+                <attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
+                <attribute name="Bundle-Name" value="ZooKeeper Bundle"/>
+                <attribute name="Bundle-SymbolicName" value="org.apache.hadoop.zookeeper"/>
+                <attribute name="Bundle-ManifestVersion" value="2"/>
+                <attribute name="Bundle-Version" value="${version}"/>
+                <attribute name="Bundle-License" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
+                <attribute name="Bundle-DocURL" value="http://hadoop.apache.org/zookeeper"/>
+                <attribute name="Import-Package" value='javax.management,org.apache.log4j,org.osgi.framework;version="[1.4,2.0)",org.osgi.util.tracker;version="[1.1,2.0)"'/>
+                <attribute name="Export-Package" value='org.apache.zookeeper;version="${version}",org.apache.zookeeper.data;version="${version}",org.apache.zookeeper.version;version="${version}",org.apache.zookeeper.server;version="${version}",org.apache.zookeeper.server.quorum;version="${version}"'/>
             </manifest>
             </manifest>
         </jar>
         </jar>
     </target>
     </target>
@@ -582,25 +596,34 @@
 
 
       <copy todir="${dist.dir}"> 
       <copy todir="${dist.dir}"> 
         <fileset file="${build.dir}/${final.name}.jar"/>
         <fileset file="${build.dir}/${final.name}.jar"/>
-        <fileset file="${build.dir}/${final.name}-bin.jar"/>
+      </copy>
+
+      <checksum file="${dist.dir}/${final.name}.jar" algorithm="md5"/>
+      <checksum file="${dist.dir}/${final.name}.jar" algorithm="sha1"/>
+
+      <mkdir dir="${dist.maven.dir}"/>
+
+      <copy file="${build.dir}/${final.name}-bin.jar"
+            tofile="${dist.maven.dir}/${final.name}.jar"/> 
+      <copy todir="${dist.maven.dir}"> 
         <fileset file="${build.dir}/${final.name}-sources.jar"/>
         <fileset file="${build.dir}/${final.name}-sources.jar"/>
         <fileset file="${build.dir}/${final.name}-javadoc.jar"/>
         <fileset file="${build.dir}/${final.name}-javadoc.jar"/>
       </copy>
       </copy>
       
       
-      <checksum file="${dist.dir}/${final.name}.jar" algorithm="md5"/>
-      <checksum file="${dist.dir}/${final.name}.jar" algorithm="sha1"/>
-      <checksum file="${dist.dir}/${final.name}-bin.jar" algorithm="md5"/>
-      <checksum file="${dist.dir}/${final.name}-bin.jar" algorithm="sha1"/>
-      <checksum file="${dist.dir}/${final.name}-sources.jar" algorithm="md5"/>
-      <checksum file="${dist.dir}/${final.name}-sources.jar" algorithm="sha1"/>
-      <checksum file="${dist.dir}/${final.name}-javadoc.jar" algorithm="md5"/>
-      <checksum file="${dist.dir}/${final.name}-javadoc.jar" algorithm="sha1"/>
+      <checksum file="${dist.maven.dir}/${final.name}.jar" algorithm="md5"/>
+      <checksum file="${dist.maven.dir}/${final.name}.jar" algorithm="sha1"/>
+      <checksum file="${dist.maven.dir}/${final.name}-sources.jar" algorithm="md5"/>
+      <checksum file="${dist.maven.dir}/${final.name}-sources.jar" algorithm="sha1"/>
+      <checksum file="${dist.maven.dir}/${final.name}-javadoc.jar" algorithm="md5"/>
+      <checksum file="${dist.maven.dir}/${final.name}-javadoc.jar" algorithm="sha1"/>
 
 
       <ivy:makepom settingsRef="${ant.project.name}" ivyfile="${basedir}/ivy.xml"
       <ivy:makepom settingsRef="${ant.project.name}" ivyfile="${basedir}/ivy.xml"
-                   pomfile="${dist.dir}/${final.name}.pom">
+                   pomfile="${dist.maven.dir}/${final.name}.pom">
         <mapping conf="default" scope="compile"/>
         <mapping conf="default" scope="compile"/>
         <mapping conf="test" scope="test"/>
         <mapping conf="test" scope="test"/>
       </ivy:makepom>
       </ivy:makepom>
+      <checksum file="${dist.maven.dir}/${final.name}.pom" algorithm="md5"/>
+      <checksum file="${dist.maven.dir}/${final.name}.pom" algorithm="sha1"/>
 
 
       <copy todir="${dist.dir}/bin">
       <copy todir="${dist.dir}/bin">
         <fileset dir="bin"/>
         <fileset dir="bin"/>