Update of /cvsroot/csseditor/net.sourceforge.csseditor
In directory sc8-pr-cvs1:/tmp/cvs-serv22879
Added Files:
build.xml
Log Message:
Add experimental Ant build
--- NEW FILE: build.xml ---
<?xml version="1.0"?>
<project name="net.sourceforge.csseditor" default="dist" basedir=".">
<description>CSS Editor for Eclipse</description>
<property file="build.properties"/>
<property name="src.dir" location="src"/>
<property name="build.dir" location="build"/>
<property name="build.classes.dir" location="${build.dir}/classes"/>
<property name="build.docs.dir" location="${build.dir}/docs"/>
<property name="dist.dir" location="dist"/>
<property name="eclipse.home" location="../.."/>
<target name="init">
<xmlproperty file="plugin.xml" collapseattributes="yes"/>
<condition property="os" value="win32">
<os family="windows"/>
</condition>
<condition property="os" value="carbon">
<os family="mac"/>
</condition>
<!-- TODO: add other supported OSes here -->
<path id="classpath">
<pathelement location="${eclipse.home}/plugins/org.eclipse.compare_3.0.0/compare.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.core.resources_3.0.0/resources.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.core.runtime_3.0.0/runtime.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.jface_3.0.0/jface.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.jface.text_3.0.0/jfacetext.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.osgi_3.0.0/osgi.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.ui_3.0.0/ui.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.ui.ide_3.0.0/ide.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.ui.views_3.0.0/views.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.ui.workbench_3.0.0/workbench.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.ui.workbench.texteditor_3.0.0/texteditor.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.ui.editors_3.0.0/editors.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.swt.${os}_3.0.0/ws/${os}/swt.jar"/>
<pathelement location="${eclipse.home}/plugins/org.eclipse.text_3.0.0/text.jar"/>
</path>
</target>
<target name="compile" depends="init" description="Compile Java code">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${build.classes.dir}"
classpathref="classpath"/>
</target>
<target name="jar" depends="compile" description="Build plugin JAR">
<jar destfile="${build.dir}/csseditor.jar">
<fileset dir="${build.classes.dir}" includes="**/*.class"/>
<fileset dir="${src.dir}" includes="**/*.properties"/>
</jar>
</target>
<target name="srczip" depends="init" description="Build source ZIP">
<mkdir dir="${build.dir}"/>
<zip destfile="${build.dir}/csseditorsrc.zip">
<fileset dir="${src.dir}" includes="**/*.java"/>
</zip>
</target>
<target name="javadoc" depends="init" description="Generate API documentation">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.docs.dir}"/>
<javadoc packagenames="net.sourceforge.csseditor.*"
sourcepath="${src.dir}" destdir="${build.docs.dir}"
classpathref="classpath"/>
</target>
<target name="dist" depends="jar, srczip" description="Assemble distribution">
<mkdir dir="${dist.dir}"/>
<property name="plugin.prefix" value="${plugin.id}_${plugin.version}"/>
<zip destfile="${dist.dir}/${plugin.id}_${plugin.version}.zip">
<zipfileset prefix="${plugin.prefix}" dir="${basedir}"
includes="${bin.includes}" excludes="${bin.excludes}"/>
<zipfileset prefix="${plugin.prefix}" dir="${build.dir}"
includes="csseditor.jar, csseditorsrc.zip"/>
</zip>
</target>
<target name="clean" description="Remove generated files">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
</project>
|