| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <project name="deploy" default="jar_plugin" basedir=".."> |
| <property name="plugname" value="Svn4Idea"/> |
| <property name="build.path" value="build_out"/> |
| |
| |
| <target name="deploy-javasvn"> |
| <ant dir="../org.tmatesoft.javasvn" antfile="../org.tmatesoft.javasvn/build.xml" target="clean"/> |
| <ant dir="../org.tmatesoft.javasvn" antfile="../org.tmatesoft.javasvn/build.xml" target="build-library"/> |
| <copy file="../org.tmatesoft.javasvn/build/lib/javasvn.jar" tofile="lib/javasvn.jar" overwrite="true"/> |
| </target> |
| |
| <target name="jar_plugin"> |
| |
| <delete includeEmptyDirs="true" failonerror="false"> |
| <fileset dir="${build.path}/com"/> |
| <fileset dir="${build.path}/META-INF"/> |
| </delete> |
| |
| <mkdir dir="${build.path}"/> |
| |
| <copy todir="${build.path}/META-INF"> |
| <fileset dir="src/META-INF"/> |
| </copy> |
| |
| <copy todir="${build.path}/com"> |
| <fileset dir="classes/com"/> |
| </copy> |
| |
| <jar jarfile="${build.path}/${plugname}.jar" basedir="${build.path}" |
| excludes="${plugname}.jar"/> |
| |
| <mkdir dir="${idea.path}/plugins/svn4idea"/> |
| <mkdir dir="${idea.path}/plugins/svn4idea/lib"/> |
| <copy todir="${idea.path}/plugins/svn4idea/lib"> |
| <fileset file="${build.path}/${plugname}.jar"/> |
| <fileset file="${svnjavahl.path}"/> |
| </copy> |
| </target> |
| <target name="package"> |
| <tstamp/> |
| <property file="version.properties"/> |
| <condition property="version" value="unknown"> |
| <not> |
| <isset property="version"/> |
| </not> |
| </condition> |
| <property name="targetdir" value="svn4idea-${version}"/> |
| <delete failonerror="false" includeemptydirs="true"> |
| <fileset dir="${targetdir}"/> |
| </delete> |
| <mkdir dir="${targetdir}"/> |
| <mkdir dir="${targetdir}/src"/> |
| <copy todir="${targetdir}/src"> |
| <fileset dir="src"> |
| <exclude name="**/.svn*"/> |
| <exclude name="com/qintsoft/svn4idea/test/**"/> |
| </fileset> |
| </copy> |
| <copy todir="${targetdir}"> |
| <fileset file="README.txt"/> |
| </copy> |
| <mkdir dir="${targetdir}/build"/> |
| <copy todir="${targetdir}/build"> |
| <fileset file="build/build.xml"/> |
| </copy> |
| <mkdir dir="${targetdir}/cls"/> |
| <replace file="${targetdir}/src/com/qintsoft/svn4idea/Version.java" token="@devbuild@" value="${version}"/> |
| <replace file="${targetdir}/src/com/qintsoft/svn4idea/Version.java" token="@tstamp@" value="${TSTAMP}"/> |
| <replace file="${targetdir}/src/com/qintsoft/svn4idea/Version.java" token="@date@" value="${DSTAMP}"/> |
| <javac compiler="modern" destdir="${targetdir}/cls"> |
| <src path="${targetdir}/src"/> |
| <classpath path="${svnjavahl.path}"/> |
| <classpath path="${svnup.path}"/> |
| <classpath path="${idea.path}/lib/dev/openapi.jar"/> |
| <classpath path="${idea.path}/lib/jdom.jar"/> |
| <exclude name="META-INF/plugin.xml"/> |
| </javac> |
| <mkdir dir="${targetdir}/cls/META-INF"/> |
| <copy todir="${targetdir}/cls/META-INF"> |
| <fileset file="${targetdir}/src/META-INF/plugin.xml"/> |
| </copy> |
| <jar jarfile="svn4idea-${version}.jar" basedir="${targetdir}/cls"> |
| </jar> |
| <delete includeemptydirs="true" failonerror="false"> |
| <fileset dir="${targetdir}/cls"/> |
| </delete> |
| <zip zipfile="svn4idea-${version}.zip" basedir="." includes="${targetdir}/**"/> |
| <delete includeemptydirs="true" failonerror="false"> |
| <fileset dir="${targetdir}"/> |
| </delete> |
| </target> |
| </project> |