文件2:
Sharpen-Common.XML
<project name="sharpen common">
<property file="sharpen.propertIEs" />
<Macrodef name="reset-dir">
<attribute name="dir" />
<sequential>
<delete dir="@{dir}" />
<mkdir dir="@{dir}" />
</sequential>
</Macrodef>
<Macrodef name="sharpen">
<attribute name="workspace" />
<attribute name="resource" />
<element name="args" optional="yes" />
<sequential>
<exec executable="${file.jvm.jdk1.5}" failonerror="true"
timeout="1800000">
<arg value="-Xms256m" />
<arg value="-Xmx512m" />
<arg value="-cp" />
<arg value="${eclipse.startup.jar}" />
<arg value="org.eclipse.core.launcher.Main" />
<arg value="-data" />
<arg file="@{workspace}" />
<arg value="-application" />
<arg value="sharpen.core.application" />
<arg value="-header" />
<arg file="config/copyright_comment.txt" />
<arg value="@{resource}" />
<args />
</exec>
</sequential>
</Macrodef>
<target name="install-sharpen-plugin">
<property name="sharpen.core.dir" location="../sharpen.core" />
<reset-dir dir="${dir.dist.classes.sharp}" />
<echo>${eclipse.home}/plugins</echo>
<Javac fork="true" debug="true" target="1.5" source="1.5"
destdir="${dir.dist.classes.sharp}" srcdir="${sharpen.core.dir}/src"
encoding="UTF-8">
<classpath>
<fileset dir="${eclipse.home}/plugins">
<include name="org.eclipse.osgi_*/osgi.jar" />
<include
name="org.eclipse.core.resources_*/resources.jar" />
<include
name="org.eclipse.core.runtime_*/runtime.jar" />
<include name="org.eclipse.jdt.core_*/jdtcore.jar" />
<!-- redundant entrIEs: in newer eclipse installs those reside in jars -->
<include name="org.eclipse.osgi_*.jar" />
<include name="org.eclipse.core.resources_*.jar" />
<include name="org.eclipse.core.runtime_*.jar" />
<include name="org.eclipse.jdt.core_*.jar" />
<include name="org.eclipse.jdt.launching_*.jar" />
<include name="org.eclipse.equinox.*.jar" />
<include name="org.eclipse.core.jobs_*.jar" />
</fileset>
</classpath>
</Javac>
<property name="plugin.dir"
value="${plugins.home}/sharpen.core_1.0.0" />
<reset-dir dir="${plugin.dir}" />
<jar destfile="${plugin.dir}/sharpen.jar"
basedir="${dir.dist.classes.sharp}" />
<copy todir="${plugin.dir}"
file="${sharpen.core.dir}/plugin.XML" />
</target>
</project>