Ticket #1663: 0001-Adding-ByteBuddy-dependency-for-Mockito.-If-ByteBudd.patch

File 0001-Adding-ByteBuddy-dependency-for-Mockito.-If-ByteBudd.patch, 3.9 KB (added by kay, 6 years ago)

patch for 1663, 1661

  • build.xml

    From 02aef72a2828f19a09028327f0e636ecaab6409d Sat Sep 19 05:00:00 2001
    From: kay <kay@mail.i2p>
    Date: Sat, 19 Sep 2015 05:00:00 +0000
    Subject: [PATCH] Adding ByteBuddy dependency for Mockito.
     If ByteBuddy is not present, OutboxProcessorTest will fail.
     See also task-1661, task-1663.
    
    ---
     build.xml | 19 +++++++++++++++++--
     1 file changed, 17 insertions(+), 2 deletions(-)
    
    diff --git a/build.xml b/build.xml
    index e5fff4c..3c4d575 100644
    a b  
    1212   
    1313    <property name="junit.filename" value="junit-4.8.1.jar"/>
    1414    <property name="junit.url" value="http://sourceforge.net/projects/junit/files/junit/4.8.1/junit-4.8.1.jar/download"/>
     15    <property name="bytebuddy.filename" value="byte-buddy-0.6.14.jar"/>
     16    <property name="bytebuddy.url" value="https://search.maven.org/remotecontent?filepath=net/bytebuddy/byte-buddy/0.6.14/byte-buddy-0.6.14.jar" />
    1517    <property name="mockito.filename" value="mockito-core-2.0.31-beta.jar"/>
    1618    <property name="mockito.url" value="https://bintray.com/artifact/download/szczepiq/maven/org/mockito/mockito-core/2.0.31-beta/mockito-core-2.0.31-beta.jar"/>
    1719    <!-- Just the main jMock .jar, the .zip contains this and dependencies -->
    1820    <property name="jmock.filename" value="jmock-2.6.0.jar"/>
    1921    <property name="jmock.archive" value="jmock-2.6.0-jars.zip"/>
    2022    <property name="jmockcp" value="${lib}/jmock-2.6.0.jar:${lib}/hamcrest-core-1.3.jar:${lib}/hamcrest-library-1.3.jar:${lib}/jmock-legacy-2.6.0.jar:${lib}/cglib-nodep-2.2.3.jar:${lib}/objenesis-1.0.jar"/>
    21     <property name="jmock.url" value="http://jmock.org/downloads/${jmock.archive}"/>
     23    <property name="jmock.url" value="http://www.jmock.org/downloads/${jmock.archive}"/>
    2224
    2325    <!-- Dependencies -->
    2426    <!-- Local -->
     
    248250            <lib file="${lib}/${bcprov.filename}"/>
    249251            <lib file="${lib}/${ntruenc.filename}"/>
    250252            <lib file="${lib}/${scrypt.filename}"/>
    251             <lib file="${lib}/${lzma.filename"/>
     253            <lib file="${lib}/${lzma.filename}"/>
    252254            <lib file="${lib}/${gmss.filename}"/>
    253255            <lib file="${lib}/${jcommon.filename}" />
    254256            <lib file="${lib}/${jfreechart.filename}" />
     
    652654    <target name="junit" depends="compile">
    653655        <available property="junitexists" file="${lib}/${junit.filename}" type="file"/>
    654656        <ant target="downloadjunit"/>
     657        <available property="bytebuddyexists" file="${lib}/${bytebuddy.filename}" type="file"/>
     658        <ant target="downloadbytebuddy"/>
    655659        <available property="mockitoexists" file="${lib}/${mockito.filename}" type="file"/>
    656660        <ant target="downloadmockito"/>
    657661        <available property="jmockexists" file="${lib}/${jmock.filename}" type="file"/>
     
    660664        <path id="junitcp">
    661665            <pathelement location="${lib}/${junit.filename}"/>
    662666            <pathelement location="${lib}/${mockito.filename}"/>
     667            <pathelement location="${lib}/${bytebuddy.filename}"/>
    663668            <pathelement path="${jmockcp}"/>
    664669            <pathelement location="./ant_build/classes"/>
    665670            <path refid="cp"/>
     
    707712        <get src="${junit.url}" verbose="true" dest="${lib}/${junit.filename}"/>
    708713    </target>
    709714
     715    <target name="downloadbytebuddy" unless="bytebuddyexists">
     716        <input message="ByteBuddy not found, download now?" validargs="y,n" addproperty="userinput.bytebuddy"/>
     717        <fail message="OK, aborting build." >
     718            <condition>
     719                <equals arg1="${userinput.bytebuddy}" arg2="n"/>
     720            </condition>
     721        </fail>
     722        <get src="${bytebuddy.url}" verbose="true" dest="${lib}/${bytebuddy.filename}"/>
     723    </target>
     724
    710725    <target name="downloadmockito" unless="mockitoexists">
    711726        <input message="Mockito not found, download now?" validargs="y,n" addproperty="userinput.mockito"/>
    712727        <fail message="OK, aborting build." >