Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dash-dev] HOWTO call custom code during build process (was Re: Advice on plugin build)

If using Athena/PDE, there are lots of places to run custom code during
a build.

If you have a look in
org.eclipse.dash.common.releng/builder/all/customTargets.xml [1], you'll
see numerous calls like this one:

	<!--
===================================================================== -->
	<!-- Steps to do before running the build.xmls for the elements being
built. -->
	<!--
===================================================================== -->
	<target name="preProcess">
		<ant target="buildExtra.xml" antfile="${helper}">
			<property name="theTarget" value="preProcess" />
		</ant>
	</target>

If you write a custom Ant target with the same name, eg., "preProcess",
in a buildExtra.xml file in the root of your Athena .releng project,
Athena will call your custom code at the correct step in the build process.

Available targets include:

preFetch, postFetch
preGenerate, postGenerate
preAssemble, postAssemble
prePackage, postPackage
preProcess, postProcess
postBuild

[1]http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.common.releng/builder/all/customTargets.xml?root=Technology_Project&view=diff&r1=1.23&r2=1.24

HTH,

Nick

On 05/30/2010 12:11 PM, Gary Brown wrote:
Hi Nick

I am building an Eclipse update site for another project, in a similar way to how you have setup the releng project for pi4soa.

I have managed to build the update site fine, when I exclude a particular plugin that needs to run an 'antlr' parser generator step before the plugin can be fully built.

Was wondering if you had any advice on how I can customise the build for this particular plugin, so that after it checks out the code from svn, it can invoke an antlr ant task, before the compilation step is performed?

Regards
Gary


Back to the top