/plugins/SVNPlugin/tags/0.5.1/build.xml
# · XML · 240 lines · 129 code · 39 blank · 72 comment · 0 complexity · 78554b39e679a021c6bb058b56505987 MD5 · raw file
- <project name="SVNPlugin" default="dist" basedir=".">
-
- <!-- read build.props to override properties set below -->
- <property file="../build.properties"/>
- <property file="build.properties"/>
-
- <!-- default location of jedit.jar -->
- <property name="jedit.install.dir" value="../.."/>
-
-
- <!-- jar name -->
- <property name="jar.name" value="${ant.project.name}.jar"/>
-
- <!-- version number -->
- <property name="build.num" value="1.0.0"/>
-
- <!-- where to put the finished plugin -->
- <property name="install.dir" value=".." />
-
- <!-- source code directory, this is where the .java files live -->
- <property name="src.dir" location="src" />
- <mkdir dir="${src.dir}"/>
-
- <!-- library directory, location for third party jars -->
- <property name="lib.dir" location="lib"/>
- <mkdir dir="${lib.dir}"/>
-
- <!-- temporary directory for post-compile processing -->
- <property name="build.dir" location="build"/>
- <mkdir dir="${build.dir}"/>
-
- <!-- configuration directory, this is where the configuration files for the
- plugin are placed for additional processing prior to getting jarred. -->
- <property name="config.dir" location="${build.dir}/config" />
- <mkdir dir="${config.dir}"/>
-
- <!-- documentation directory, this is where the plugin documentation
- files live. Files in this directory will be distributed with the plugin -->
- <property name="doc.dir" location="${build.dir}/docs" />
- <mkdir dir="${doc.dir}"/>
-
- <!-- the directory for the compiled classes. Files in this directory will be
- included in the finished jar file. -->
- <property name="classes.dir" location="${build.dir}/classes" />
- <mkdir dir="${classes.dir}"/>
-
-
- <!-- ========================================================================
- Target: set classpath
- ========================================================================= -->
- <target name="setClasspath">
- <path id="classpathref">
- <!-- required locations/jars -->
- <pathelement location="${classes.dir}" />
- <pathelement path="${java.class.path}"/>
-
- <!-- SVNKit jars -->
- <pathelement location="${lib.dir}/ganymed.jar"/>
- <pathelement location="${lib.dir}/svnkit-cli.jar"/>
- <pathelement location="${lib.dir}/svnkit.jar"/>
- <pathelement location="${lib.dir}/svnkit-javahl.jar"/>
-
- <!-- required for jEdit plugin -->
- <pathelement location="${jedit.install.dir}/jedit.jar" />
-
- <!-- dependencies -->
- <pathelement location="${install.dir}/ProjectViewer.jar"/>
- <pathelement location="${install.dir}/kappalayout.jar"/>
- <pathelement location="${install.dir}/Console.jar"/>
- <pathelement location="${install.dir}/xml-apis.jar"/>
- <pathelement location="${install.dir}/xercesImpl.jar"/>
- <pathelement location="${install.dir}/JDiffPlugin.jar"/>
- </path>
- </target>
-
- <!-- ========================================================================
- Target: compile
- ========================================================================= -->
- <target name="compile"
- description="Compile"
- depends="init,setClasspath">
- <javac deprecation="on"
- debug="on"
- nowarn="on"
- destdir="${classes.dir}"
- srcdir="${src.dir}"
- target="1.5"
- source="1.5">
- <classpath refid="classpathref" />
- <compilerarg value="-Xlint:unchecked"/>
- </javac>
- <copy todir="${classes.dir}/docs" overwrite="no">
- <fileset dir="${src.dir}/docs">
- <include name="**/*"/>
- </fileset>
- </copy>
- </target>
-
-
- <!-- ========================================================================
- Target: dist
- creates jar file suitable for dropping into jEdit, and puts it up one
- directory level
- ========================================================================= -->
- <target name="dist"
- description="Compiles, jars, puts the jar in the jEdit jars directory."
- depends="clean,init,compile,prep_files">
-
-
- <!-- make the plugin jar file -->
- <tstamp/>
- <jar jarfile="${install.dir}/${ant.project.name}.jar">
- <manifest>
- <attribute name="AppName" value="${ant.project.name}" />
- <attribute name="AppVersion" value="${build.num}" />
- <attribute name="Author" value="Dale Anson" />
- <attribute name="Created-By" value="${user.name}" />
- <attribute name="Created-On" value="${TODAY}"/>
- </manifest>
-
- <!-- include everything in the build directory -->
- <fileset dir="${classes.dir}">
- <include name="**/*" />
- </fileset>
-
- <!-- include everything in the config directory-->
- <fileset dir="${config.dir}">
- <include name="**/*" />
- </fileset>
-
- <!-- include everything in the doc directory -->
- <fileset dir="${doc.dir}">
- <include name="**/*" />
- </fileset>
- </jar>
-
- <copy todir="${install.dir}">
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- </copy>
-
- </target>
-
- <!-- ========================================================================
- Target: prep_files
- prepares certain files for distribution by doing string replacement.
- Assumes that the configuration files and documentation files are ready.
- ========================================================================= -->
- <target name="prep_files">
- <echo>preparing files</echo>
- <!-- clean out the config and doc deployment directories -->
- <delete>
- <fileset dir="${config.dir}" includes="**/*"/>
- <fileset dir="${doc.dir}" includes="**/*"/>
- </delete>
-
- <!-- copy the config files to deployment directory
- CHANGED: apparently, having a 'src/config' directory to hold the configuration
- files is too confusing, so now they are dumped in basedir, along with
- any other crud that may or may not be part of the deployment package.
- Now need to explicitly name the proper files, so we don't pick up the
- crud.
- -->
- <copy todir="${config.dir}">
- <fileset dir="${basedir}">
- <include name="SVNPlugin.props"/>
- <include name="dockables.xml"/>
- <include name="actions.xml"/>
- </fileset>
- </copy>
-
- <!-- copy the docs -->
- <copy todir="${doc.dir}/docs" overwrite="yes">
- <fileset dir="${src.dir}/docs">
- <include name="**/*"/>
- </fileset>
- </copy>
-
- <!-- insert the build number into the documentation and configuration
- files -->
- <!-- CHANGED: don't do this, the python build system for jEdit gets
- confused if the build number isn't present BEFORE the build, so need
- to change it by hand everytime there is a new release.
- <replace dir="${config.dir}" token="@@build.num@@"
- value="${build.num}" />
- -->
- <replace dir="${doc.dir}" token="@@build.num@@"
- value="${build.num}" />
- <tstamp/>
- <replace dir="${doc.dir}" token="@@tstamp@@"
- value="${TODAY}" />
- </target>
-
- <!-- ========================================================================
- Target: clean
- deletes all files from the temp directory
- ========================================================================= -->
- <target name="clean" description="Delete all files from the classes directory.">
- <!-- delete old directories that may still be hanging around. These
- caused some confusion. -->
- <delete dir="${classes.dir}"/>
- <delete dir="${build.dir}"/>
- <mkdir dir="${classes.dir}"/>
- <mkdir dir="${build.dir}"/>
-
- <!--
- <delete file="${install.dir}/ganymed.jar"/>
- <delete file="${install.dir}/svnkit-cli.jar"/>
- <delete file="${install.dir}/svnkit.jar"/>
- <delete file="${install.dir}/svnkit-javahl.jar"/>
- -->
- </target>
-
- <!-- ========================================================================
- Target: init
- this target creates the directories needed for this project and
- only needs to be done once.
- ========================================================================= -->
- <target name="init"
- description="Create directory structure.">
- <fail unless="jedit.install.dir" message="Please set jedit.install.dir property."/>
- <mkdir dir="${src.dir}" />
- <mkdir dir="${classes.dir}" />
- <mkdir dir="${doc.dir}" />
- <mkdir dir="${config.dir}" />
- </target>
-
-
- <target name="run"
- description="run"
- depends="init,setClasspath">
- <java classname="ise.plugin.svn.action.ProjectGroupLoader">
- <classpath refid="classpathref" />
- </java>
- </target>
-
-
- </project>