build.xml 3.47 KB
Newer Older
1 2
<project name="BytecodeOutline" default="plugin">

ekuleshov's avatar
ekuleshov committed
3 4
  <property file="${user.home}/asm-build.properties"/>
  <property file="build.properties"/>
5

6 7 8 9
  <property name="src"                value="${basedir}/src"/>
  <property name="externals"          value="${basedir}/externals"/>
  <property name="out"                value="${basedir}/output"/>
  <property name="out.build"          value="${out}/build"/>
ekuleshov's avatar
ekuleshov committed
10 11 12

  <property name="plugin.jar"   value="${plugin.id}_${plugin.version}.jar"/>
  <property name="feature.jar"  value="${plugin.id}.feature_${plugin.version}.jar"/>
13

14 15 16
   <path id="saxon.classpath">
        <fileset dir="${saxon.home}" includes="*.jar"/>
    </path>
17 18 19

  <target name="init">
    <path id="classpath">
20
      <fileset dir="lib" includes="*.jar"/>
21
      <fileset dir="${eclipse.home}" includes="plugins/**/*.jar"/>
22 23 24 25 26
    </path>
  </target>

  <target name="compile" depends="init">
    <mkdir dir="${out.build}"/>
27
    <javac destdir="${out.build}" debug="on" source="1.5" target="1.5" includeantruntime="false">
28 29 30
      <classpath refid="classpath"/>
      <src path="${src}"/>
      <include name="**/*.java"/>
31
    </javac>
32 33 34
  </target>

  <target name="jars" depends="compile">
35
    <copy todir="${out.build}">
36
      <fileset dir="${src}">
37 38
        <include name="**/*.properties"/>
      </fileset>
39 40
    </copy>

ekuleshov's avatar
ekuleshov committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54
    <zip zipfile="${out}/BytecodeOutlinesrc.zip">
      <zipfileset dir="${src}" includes="**/*" prefix="src"/>
      <fileset dir=".">
        <include name="icons/*"/>
        <include name="plugin.xml"/>
        <include name="build.properties"/>
        <include name="META-INF/*"/>
        <include name="build.xml"/>
        <include name="build.config"/>
        <include name=".project"/>
        <include name=".classpath"/>
        <include name="README.txt"/>
        <include name="LICENSE.txt"/>
      </fileset>
55 56 57
      <fileset dir="site">
        <include name="feature.xml"/>
        <include name="site.xml"/>
58
      </fileset>
59 60 61
    </zip>
  </target>

62
  <target name="plugin" depends="jars,xslt">
63
    <zip zipfile="${out}/${plugin.jar}">
64
      <zipfileset dir="${out}" includes="BytecodeOutlinesrc.zip"/>
65
      <fileset dir=".">
66
        <include name="META-INF/MANIFEST.MF"/>
67 68
        <include name="icons/**/*"/>
        <include name="plugin.xml"/>
69
        <include name="about.html"/>
70
        <include name="*.txt"/>
71
        <include name="lib/*.jar"/>
72
      </fileset>
73
    <fileset dir="${out.build}">
74 75
      <include name="**/*"/>
    </fileset>
76
      <zipfileset dir="${out}/doc" includes="toc.xml,ref-*.html" prefix="doc"/>
77
    </zip>
ekuleshov's avatar
ekuleshov committed
78
  </target>
79

ekuleshov's avatar
ekuleshov committed
80 81
  <target name="feature" depends="plugin">
    <jar zipfile="${out}/${feature.jar}">
82
      <fileset dir="site" includes="feature.xml"/>
ekuleshov's avatar
ekuleshov committed
83 84
    </jar>
  </target>
85

ekuleshov's avatar
ekuleshov committed
86 87
  <target name="site" depends="feature">
    <zip zipfile="${out}/${plugin.id}.update_${plugin.version}.zip">
88
      <zipfileset dir="site" includes="site.xml"/>
ekuleshov's avatar
ekuleshov committed
89 90
      <zipfileset dir="${out}" includes="${feature.jar}" prefix="features"/>
      <zipfileset dir="${out}" includes="${plugin.jar}"  prefix="plugins"/>
91 92
    </zip>
  </target>
93

94
  <target name="clean">
ekuleshov's avatar
ekuleshov committed
95 96 97
    <delete failonerror="false" includeEmptyDirs="true">
      <fileset dir="${out}" includes="**/*"/>
    </delete>
98 99
  </target>

100 101
  <target name="xslt" depends="init">
    <mkdir dir="${out}/doc"/>
102
    <xslt basedir="." destdir="${out}/doc" includes="opcodes.xml" classpathref="saxon.classpath"
103
          style="opcodes-doc.xsl" force="true">
104
       <factory name="net.sf.saxon.TransformerFactoryImpl" />
105 106 107
    </xslt>
  </target>

108
</project>