Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dash-dev] Re: Athena CBI - extra work needed after fetch from CVS but before compiling


There are basically two places to do this kind of processing.
As you mentioned, the customTargets.xml postFetch or preGenerate.  I'm not sure of the details of Athena, but I looked briefly at org.eclipse.dash.common.releng and it looks like they deliver a customTargets.xml that gets used normally.

If Athena allows you to specify properties that will be set before calling pde.build, then you could provide your own customTargets.xml and set "customTargets" to point to your own copy.  (Setting this property is one of the first things pde.build does, which is why you need to set it before calling build.)  I would suggest your copy then import the Athena version.  You're customTargets.xml can have something like:

<available property="athenaCustom" file="${builder}/customTargets.xml" value="${builder}/customTargets.xml" />
<import file="${athenaCustom}"/>
<target name="preGenerate" >
   stuff here overrides the preGenerate target in athenaCustom
</target>


The other place to do this is using a customBuildCallback.xml in the plugin itself.
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_custom_callbacks.htm
The pre.build.jars target would be appropriate place to do this work.

The decision between the two would normally be based on how specific this processing is to the plugins.  For something that is looking at a model file in your bundle and generating .java files I would probably use custom call backs instead of custom targets.  Unless every bundle (or at least a lot of them) need to do the same processing.

-Andrew





From: Nick Boldt <nickboldt@xxxxxxxxx>
To: Jacek Pospychała <jacek.pospychala@xxxxxxxxx>
Cc: Andrew Niefer/Ottawa/IBM@IBMCA, Tools for Committer Community <dash-dev@xxxxxxxxxxx>
Date: 10/05/2009 03:27 PM
Subject: Re: Athena CBI - extra work needed after fetch from CVS but before compiling





Not sure where / how you'd invoke that, or if we expose that hook in PDE
(yet). I'll copy this to dash-dev@ and to Andrew Niefer - he might have
a suggestion for how you can do this or what we need to add in Athena.

N

Jacek Pospychała wrote:
> hi Nick,
> I'm using Athena and trying to do generate some java files right after
> their model get's fetched from CVS.
> Normally I would do this in customTargets.xml, and how would that look
> in Athena? I first thought of run target in buildExtra.xml but this
> seems not invoked.
> I also tried to just put customTargets.xml inside my releng directory -
> no look either.
>
> Or should this kind of task be put in specific plug-in in
> customTargets.xml? (I'd prefer to avoid mixing plugin code with it's
> build xmls)
>
> Thanks!
>
> Jacek

--
Nick Boldt ::
http://nick.divbyzero.com
Release Engineer :: Eclipse Modeling & Dash Athena



Back to the top