Przeglądaj źródła

ZOOKEEPER-633. Fetch netty using ivy for bookkeeper (giri via fpj)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@896044 13f79535-47bb-0310-9956-ffa450edef68
Flavio Paiva Junqueira 15 lat temu
rodzic
commit
c083a36f5a
5 zmienionych plików z 56 dodań i 7 usunięć
  1. 2 0
      CHANGES.txt
  2. 6 4
      build.xml
  3. 41 0
      ivysettings.xml
  4. 1 1
      src/contrib/bookkeeper/ivy.xml
  5. 6 2
      src/contrib/build-contrib.xml

+ 2 - 0
CHANGES.txt

@@ -217,6 +217,8 @@ IMPROVEMENTS:
 
   ZOOKEEPER-506. QuorumBase should use default leader election (fpj via breed)
 
+  ZOOKEEPER-633. Fetch netty using ivy for bookkeeper (giri via fpj)
+
 NEW FEATURES:
   ZOOKEEPER-539. generate eclipse project via ant target. (phunt via mahadev)
 

+ 6 - 4
build.xml

@@ -93,6 +93,7 @@
     <property name="ivy.lib" value="${build.dir}/lib"/>
     <property name="ivy.test.lib" value="${build.dir}/test/lib"/>
     <property name="ivy.jdiff.lib" value="${build.dir}/jdiff/lib"/>
+    <property name="ivysettings.xml" value="${basedir}/ivysettings.xml"/>
 
     <available property="clover.present"
                classname="com.cenqua.clover.CloverInstr"
@@ -279,21 +280,22 @@
                uri="antlib:org.apache.ivy.ant" classpathref="java.classpath"/>
       <!-- ensure that ivy taskdef is only run once, otw ant will error -->
       <property name="ivy.initialized" value="true"/>
+      <ivy:settings id="${ant.project.name}" file="${ivysettings.xml}"/>
     </target>
 
     <target name="ivy-retrieve" depends="init,ivy-init">
-      <ivy:retrieve type="jar" conf="default"
+      <ivy:retrieve settingsRef="${ant.project.name}" type="jar" conf="default"
                     pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
     </target>
 
     <target name="ivy-retrieve-test" depends="init,ivy-init">
-      <ivy:retrieve type="jar" conf="test"
+      <ivy:retrieve settingsRef="${ant.project.name}" type="jar" conf="test"
                     pattern="${ivy.test.lib}/[artifact]-[revision].[ext]"/>
     </target>
 
     <target name="ivy-retrieve-jdiff" depends="init,ivy-init">
       <mkdir dir="${ivy.jdiff.lib}"/>
-      <ivy:retrieve type="jar" conf="jdiff"
+      <ivy:retrieve settingsRef="${ant.project.name}" type="jar" conf="jdiff"
                     pattern="${ivy.jdiff.lib}/[artifact]-[revision].[ext]"/>
     </target>
 
@@ -569,7 +571,7 @@
       <checksum file="${dist.dir}/${final.name}-javadoc.jar" algorithm="md5"/>
       <checksum file="${dist.dir}/${final.name}-javadoc.jar" algorithm="sha1"/>
 
-      <ivy:makepom ivyfile="${basedir}/ivy.xml"
+      <ivy:makepom settingsRef="${ant.project.name}" ivyfile="${basedir}/ivy.xml"
                    pomfile="${dist.dir}/${final.name}.pom">
         <mapping conf="default" scope="compile"/>
         <mapping conf="test" scope="test"/>

+ 41 - 0
ivysettings.xml

@@ -0,0 +1,41 @@
+<ivysettings>
+
+ <!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+  <property name="repo.maven.org"
+    value="http://repo1.maven.org/maven2/" override="false"/>
+  <property name="repo.jboss.org"
+    value="http://repository.jboss.com/maven2/" override="false"/>
+  <property name="maven2.pattern"
+    value="[organisation]/[module]/[revision]/[module]-[revision]"/>
+  <property name="maven2.pattern.ext" value="${maven2.pattern}.[ext]"/>
+  <include url="${ivy.default.conf.dir}/ivyconf-local.xml"/>
+  <settings defaultResolver="default"/>
+  <resolvers>
+    <ibiblio name="maven2" root="${repo.maven.org}"
+      pattern="${maven2.pattern.ext}" m2compatible="true"/>
+    <ibiblio name="jboss-maven2" root="${repo.jboss.org}"
+      pattern="${maven2.pattern.ext}" m2compatible="true"/>
+
+    <chain name="default" dual="true">
+      <resolver ref="maven2"/>
+      <resolver ref="jboss-maven2"/>
+    </chain>
+
+  </resolvers>
+</ivysettings>

+ 1 - 1
src/contrib/bookkeeper/ivy.xml

@@ -33,7 +33,7 @@
   <dependencies>
     <!-- transitive false turns off dependency checking, log4j deps seem borked -->
     <dependency org="log4j" name="log4j" rev="1.2.15" transitive="false"/>
-
+    <dependency org="org.jboss.netty" name="netty" rev="3.1.5.GA" />
     <dependency org="junit" name="junit" rev="4.7" conf="test->default"/>
   </dependencies>
 

+ 6 - 2
src/contrib/build-contrib.xml

@@ -47,6 +47,7 @@
   <property name="ivy.home" value="${user.home}/.ant" />
   <property name="ivy.lib" value="${build.dir}/lib"/>
   <property name="ivy.test.lib" value="${build.test}/lib"/>
+  <property name="ivysettings.xml" value="${zk.root}/ivysettings.xml"/>
 
   <!-- to be overridden by sub-projects -->
   <target name="check-contrib"/>
@@ -188,15 +189,18 @@
              uri="antlib:org.apache.ivy.ant" classpathref="classpath"/>
     <!-- ensure that ivy taskdef is only run once, otw ant will error -->
     <property name="ivy.initialized" value="true"/>
+    <ivy:settings id="${ant.project.name}" file="${ivysettings.xml}"/> 
   </target>
 
   <target name="ivy-retrieve" depends="init,ivy-init">
-    <ivy:retrieve type="jar" conf="default"
+    <ivy:retrieve settingsRef="${ant.project.name}" type="jar" conf="default"
                   pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
+    <ivy:retrieve settingsRef="${ant.project.name}" type="bundle" conf="default"
+  				  pattern="${ivy.lib}/[artifact]-[revision].[ext]"/>
   </target>
 
   <target name="ivy-retrieve-test" depends="init,ivy-init">
-    <ivy:retrieve type="jar" conf="test"
+    <ivy:retrieve settingsRef="${ant.project.name}" type="jar" conf="test"
                   pattern="${ivy.test.lib}/[artifact]-[revision].[ext]"/>
   </target>