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

I've committed a change into HEAD for https://bugs.eclipse.org/bugs/show_bug.cgi?id=291446 (see the attached patch there), but haven't released it onto build.eclipse.org yet for fear of breaking everyone this late in the day. :)

If you're building PDT 2.2 w/ Athena locally and can grab the latest o.e.d.common.releng source from HEAD, you can try changes. Stick a postFetch target in your buildExtra.xml and it should be called at the appropriate moment.


Jacek Pospychala wrote:
Thanks guys,

As far as I get it, Athena does not yet allow to invoke custom customTargets.xml (customCustomTargets.xml?), so I opened following bug:

291446: Provide hook for extra actions after fetching code from repo and before compiling it (e.g. code generation, parser generators, etc.)

btw. now after playing a bit with builds I start to get how things work :-) Things are much easier once you find out what's the order of execution and where is what. I feel that hook-oriented way is more criptic than sequential script. For example, if there was ever any new build system going to happen, instead of customTargets.xml, I'd prefer build.xml to look like:

<target name="all">
à à à <setup>
à à à <fetch>
à à à <...e.g. here is obvious place for postFetch action>
à à à <generate>
à à à <assemble>
à à à <package>
à à à <process>
à à à <build>

Which instantly selfdocuments the kind of steps and their order in build process. It's also easy to add/remove default steps and put custom in between. Just my 0.02$


2009/10/5 Andrew Nieferà <aniefer@xxxxxxxxxx>

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
<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


    From: 	Nick Boldt <nickboldt@xxxxxxxxx <mailto:nickboldt@xxxxxxxxx>>
    To: 	Jacek PospychaÃâa <jacek.pospychala@xxxxxxxxx
    Cc: 	Andrew Niefer/Ottawa/IBM@IBMCA, Tools for Committer Community
    <dash-dev@xxxxxxxxxxx <mailto: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.


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 <http://nick.divbyzero.com/>
Release Engineer :: Eclipse Modeling & Dash Athena

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