Package list libslf4j-java / fccb60c debian / build.xml
fccb60c

Tree @fccb60c (Download .tar.gz)

build.xml @fccb60craw · history · blame

<?xml version="1.0" encoding="UTF-8"?>

<project default="jar" name="${project.name}" basedir="..">

  <target name="clean">
    <delete dir="${jcl-over-slf4j.dir}/${class.dir}" quiet="true"/>
    <delete dir="${jul-to-slf4j.dir}/${class.dir}" quiet="true"/>
    <delete dir="${log4j-over-slf4j.dir}/${class.dir}" quiet="true"/>
    <delete dir="${slf4j-api.dir}/${class.dir}" quiet="true"/>
    <delete dir="${slf4j-jcl.dir}/${class.dir}" quiet="true"/>
    <delete dir="${slf4j-jdk14.dir}/${class.dir}" quiet="true"/>
    <delete dir="${slf4j-log4j12.dir}/${class.dir}" quiet="true"/>
    <delete dir="${slf4j-nop.dir}/${class.dir}" quiet="true"/>
    <delete dir="${slf4j-simple.dir}/${class.dir}" quiet="true"/>
    <delete dir="${slf4j-migrator.dir}/${class.dir}" quiet="true"/>
<!--    <delete dir="${slf4j-ext.dir}/${class.dir}" quiet="true"/> -->

    <delete dir="${jcl-over-slf4j.dir}/${test.dir}" quiet="true"/>
    <delete dir="${jul-to-slf4j.dir}/${test.dir}" quiet="true"/>
    <delete dir="${log4j-over-slf4j.dir}/${test.dir}" quiet="true"/>
    <delete dir="${slf4j-api.dir}/${test.dir}" quiet="true"/>
    <delete dir="${slf4j-jcl.dir}/${test.dir}" quiet="true"/>
    <delete dir="${slf4j-jdk14.dir}/${test.dir}" quiet="true"/>
    <delete dir="${slf4j-log4j12.dir}/${test.dir}" quiet="true"/>
    <delete dir="${slf4j-nop.dir}/${test.dir}" quiet="true"/>
    <delete dir="${slf4j-simple.dir}/${test.dir}" quiet="true"/>
    <delete dir="${slf4j-migrator.dir}/${test.dir}" quiet="true"/>

    <delete file="${jcl-over-slf4j.jar}" quiet="true"/>
    <delete file="${jul-to-slf4j.jar}" quiet="true"/>
    <delete file="${log4j-over-slf4j.jar}" quiet="true"/>
    <delete file="${slf4j-api.jar}" quiet="true"/>
    <delete file="${slf4j-jcl.jar}" quiet="true"/>
    <delete file="${slf4j-jdk14.jar}" quiet="true"/>
    <delete file="${slf4j-log4j12.jar}" quiet="true"/>
    <delete file="${slf4j-nop.jar}" quiet="true"/>
    <delete file="${slf4j-simple.jar}" quiet="true"/>
    <delete file="${slf4j-migrator.jar}" quiet="true"/>
<!--    <delete file="${slf4j-ext.jar}" quiet="true"/> -->
  </target>

  <target name="jar">
    <mkdir dir="${slf4j-api.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-api.dir}/${source.dir}" destdir="${slf4j-api.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" />

    <jar jarfile="${slf4j-api.jar}">
      <fileset dir="${slf4j-api.dir}/${class.dir}">
          <exclude name="**/org/slf4j/impl/**"/>
      </fileset>
    </jar>

    <mkdir dir="${slf4j-jcl.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-jcl.dir}/${source.dir}" destdir="${slf4j-jcl.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${slf4j-jcl.jar}">
      <fileset dir="${slf4j-jcl.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${slf4j-jdk14.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-jdk14.dir}/${source.dir}" destdir="${slf4j-jdk14.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${slf4j-jdk14.jar}">
      <fileset dir="${slf4j-jdk14.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${slf4j-log4j12.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-log4j12.dir}/${source.dir}" destdir="${slf4j-log4j12.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${slf4j-log4j12.jar}">
      <fileset dir="${slf4j-log4j12.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${slf4j-nop.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-nop.dir}/${source.dir}" destdir="${slf4j-nop.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${slf4j-nop.jar}">
      <fileset dir="${slf4j-nop.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${slf4j-simple.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-simple.dir}/${source.dir}" destdir="${slf4j-simple.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${slf4j-simple.jar}">
      <fileset dir="${slf4j-simple.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${slf4j-migrator.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-migrator.dir}/${source.dir}" destdir="${slf4j-migrator.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${slf4j-migrator.jar}">
      <fileset dir="${slf4j-migrator.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${jcl-over-slf4j.dir}/${class.dir}"/>
    <javac srcdir="${jcl-over-slf4j.dir}/${source.dir}" destdir="${jcl-over-slf4j.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${jcl-over-slf4j.jar}">
      <fileset dir="${jcl-over-slf4j.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${jul-to-slf4j.dir}/${class.dir}"/>
    <javac srcdir="${jul-to-slf4j.dir}/${source.dir}" destdir="${jul-to-slf4j.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${jul-to-slf4j.jar}">
      <fileset dir="${jul-to-slf4j.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

    <mkdir dir="${log4j-over-slf4j.dir}/${class.dir}"/>
    <javac srcdir="${log4j-over-slf4j.dir}/${source.dir}" destdir="${log4j-over-slf4j.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>

    <jar jarfile="${log4j-over-slf4j.jar}">
      <fileset dir="${log4j-over-slf4j.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>

<!--    <mkdir dir="${slf4j-ext.dir}/${class.dir}"/>
    <javac srcdir="${slf4j-ext.dir}/${source.dir}" destdir="${slf4j-ext.dir}/${class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:/usr/share/java/javassist.jar:/usr/share/java/commons-lang.jar"/>

    <jar jarfile="${slf4j-ext.jar}">
      <fileset dir="${slf4j-ext.dir}/${class.dir}">
          <include name="**"/>
      </fileset>
    </jar>
-->
  </target>

  <target name="test-compile">
    <mkdir dir="${slf4j-api.dir}/${test.class.dir}"/>
    <javac srcdir="${slf4j-api.dir}/${test.source.dir}" destdir="${slf4j-api.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}"/>
    <jar jarfile="${slf4j-api-test.jar}">
      <fileset dir="${slf4j-api.dir}/${test.class.dir}">
          <include name="**"/>
      </fileset>
    </jar>
    <mkdir dir="${slf4j-jcl.dir}/${test.class.dir}"/>
    <javac srcdir="${slf4j-jcl.dir}/${test.source.dir}" destdir="${slf4j-jcl.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:${slf4j-api-test.jar}"/>
    <mkdir dir="${slf4j-jdk14.dir}/${test.class.dir}"/>
    <javac srcdir="${slf4j-jdk14.dir}/${test.source.dir}" destdir="${slf4j-jdk14.dir}/${test.class.dir}"
      debug="true" source="1.4" target="1.4" classpath="${slf4j-api.jar}:${slf4j-api-test.jar}:${slf4j-jdk14.jar}"/>
    <mkdir dir="${slf4j-log4j12.dir}/${test.class.dir}"/>
    <javac srcdir="${slf4j-log4j12.dir}/${test.source.dir}" destdir="${slf4j-log4j12.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:${slf4j-api-test.jar}"/>
    <mkdir dir="${slf4j-nop.dir}/${test.class.dir}"/>
    <javac srcdir="${slf4j-nop.dir}/${test.source.dir}" destdir="${slf4j-nop.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:${slf4j-api-test.jar}"/>
    <mkdir dir="${slf4j-simple.dir}/${test.class.dir}"/>
    <javac srcdir="${slf4j-simple.dir}/${test.source.dir}" destdir="${slf4j-simple.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:${slf4j-simple.jar}:${slf4j-api-test.jar}"/>
    <mkdir dir="${slf4j-migrator.dir}/${test.class.dir}"/>
    <javac srcdir="${slf4j-migrator.dir}/${test.source.dir}" destdir="${slf4j-migrator.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-migrator.jar}"/>
    <mkdir dir="${jcl-over-slf4j.dir}/${test.class.dir}"/>
    <javac srcdir="${jcl-over-slf4j.dir}/${test.source.dir}" destdir="${jcl-over-slf4j.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:${slf4j-jdk14.jar}:${jcl-over-slf4j.jar}"/>
    <mkdir dir="${jul-to-slf4j.dir}/${test.class.dir}"/>
    <javac srcdir="${jul-to-slf4j.dir}/${test.source.dir}" destdir="${jul-to-slf4j.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:${slf4j-log4j12.jar}:${jul-to-slf4j.jar}"/>
    <mkdir dir="${log4j-over-slf4j.dir}/${test.class.dir}"/>
    <javac srcdir="${log4j-over-slf4j.dir}/${test.source.dir}" destdir="${log4j-over-slf4j.dir}/${test.class.dir}"
      debug="true" source="1.5" target="1.5" classpath="${slf4j-api.jar}:${slf4j-jdk14.jar}:${log4j-over-slf4j.jar}"/>
  </target>

  <macrodef name="test">
    <attribute name="path"/>
    <attribute name="component"/>
    <sequential>
      <mkdir dir="@{component}/${test.res.dir}"/>
      <junit printsummary="yes" haltonfailure="yes">
        <classpath>
          <pathelement path="@{path}"/>
          <pathelement location="@{component}/${test.class.dir}"/>
          <pathelement location="@{component}/${test.resource.dir}"/>
          <pathelement location="${slf4j-api.jar}"/>
        </classpath>
        <formatter type="plain"/>
        <batchtest todir="@{component}/${test.res.dir}">
          <fileset dir="@{component}/${test.source.dir}">
            <include name="**/*TestCase.java"/>
            <include name="**/*Test.java"/>
            <exclude name="**/*$*"/>
            <exclude name="**/Abstract*"/>
            <exclude name="**/*PerfTest.java"/>
          </fileset>
        </batchtest>
       </junit>
    </sequential>
  </macrodef>

  <target name="test" depends="test-compile">
    <test component="${slf4j-api.dir}" path="${slf4j-api.jar}"/>
    <test component="${slf4j-jcl.dir}" path="${slf4j-api-test.jar}"/>
    <test component="${slf4j-jdk14.dir}" path="${slf4j-api-test.jar}:${slf4j-jdk14.jar}"/>
    <test component="${slf4j-log4j12.dir}" path="${slf4j-api-test.jar}:${slf4j-log4j12.jar}"/>
    <test component="${slf4j-nop.dir}" path="${slf4j-api-test.jar}:${slf4j-nop.jar}"/>
    <test component="${slf4j-simple.dir}" path="${slf4j-api-test.jar}:${slf4j-simple.jar}"/>
    <test component="${slf4j-migrator.dir}" path="${slf4j-migrator.jar}"/>
    <test component="${jcl-over-slf4j.dir}" path="${jcl-over-slf4j.jar}:${slf4j-jdk14.jar}"/>
    <test component="${jul-to-slf4j.dir}" path="${jul-to-slf4j.jar}:${slf4j-log4j12.jar}"/>
    <test component="${log4j-over-slf4j.dir}" path="${log4j-over-slf4j.jar}:${slf4j-jdk14.jar}"/>
  </target>

</project>