incubator-easyant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Louis Boudart <jeanlouis.boud...@gmail.com>
Subject Re: metabuild on any module
Date Mon, 06 Jun 2011 14:57:35 GMT
Hi,

Sorry for the long delay i had a lot of mails late.

2011/4/4 Alexander Turcan <idlsoft@gmail.com>

> Hi,
> My name is Sandu Turcan, and I've been following the progress of
>
> easyant for a while.
>
>
>
> I've worked on something similar at some point, so it's interesting to
>
> see how other people are approaching it.
>
> I like the modularity of easyant builds much better then what I had,
>
> and that's just the first thing I noticed.
>
>
>
> Like with any product there are things I miss, like metabuild
>
> functionality from anywhere.
>
> Our project had close to 50 source modules, and we could go to any one
>
> of them and treat it as a starting point for a metabuild.
>

Interesting usecase



>
> I wrote a module for easyant that does the same thing.
>
>
>
> Here is how it works:
>
> It can be imported as a plugin (but should work as a regular module as
> well):
>
>        &lt;plugin mrid="idlsoft.easyant.plugins#metabuildsupport;1.0"
> as="mm"/&gt;
>
> You will not see any additional targets, but you can do something like:
>
> eant mm:all:doit  - invokes doit on all, including the current one
>
> eant mm:all:clean - invokes clean on all
>
> eant mm:deps:doit - invokes doit only on dependencies
>
> eant mm:deps:clean+doit - invokes clean and doit on dependencies
>
>
>
> I had to implement my own ant Executor, but I made sure to avoid
>
> conflict with the bundled meta-build.
>
> The code is on https://bitbucket.org/idlsoft/easyant-modules
>

Looks good but it would probably be better to merge this feature in
MetaBuildExecutor. I guess current implementation delegates to the
ivy:buildlist task to compute an ordered list of submodules, this should be
done outside of the executor making it much more reusable and extandable.

Could we use a property instead of "target prefix" to specify the execution
scope ("all","needed","dependencies","dependents") something like easyant
-Dmeta.mode=needed clean package  ?

What do you think ?



>
>
> This covers most of what I need but it would be really helpful to have
>
> a few additional features in SubModule, I described them at
>
> https://issues.apache.org/jira/browse/EASYANT-24
>

I'll have a look to see what could be done here.



>
>
>
> I'm also working on another module - configuring easyant depending on
>
> basedir. The idea is to walk the directory structure from the current
>
> directory up, look for easyant.properties files, and load them.
>
> Ideally this could be supported by standard easyant configuration, because
>
> then it could kick in before the plugin repository is initialized.
>

I'm not sure i understand the real objective of this plugin could you give a
concrete example ?
I assume this should be usefull when you need to share properties across
subprojects  isn't it ?
Easyant has an undocumented feature to inherited properties / plugins  :
http://incubator.apache.org/easyant/history/trunk/howto/multimodules.html#module-inheritance
You can create module.ivy files with your shared configuration it can be
properties / plugins / dependencies etc...
Then  you can reference it in your own module.ivy using <extends> tag.

Let's take a concrete example :
Imagine this is the "parent.ivy" where all configurations are shared

<ivy-module version="2.0">
    <info organisation="org.apache.easyant" module="example-parent"
revision="0.1" status="integration" >
        <ea:plugin module="emma" revision="0.1"/>
        <ea:property module="myproperty" revision="i would love to be
inherited"/>
    </info>
    ...
</ivy-module>

And in submodules requiring this configuration we would have something like

<ivy-module version="2.0">
    <info organisation="org.apache.easyant" module="example-submodule"
status="integration" >
        <!-- Inherit all meta data (plugins, properties, dependencies)
from org.apache.easyant#example-parent in revision 0.1 -->
        <extends organisation="org.apache.easyant"
name="example-parent" revision="0.1" />
        <ea:build module="build-webapp-java" revision="0.1"/>
    </info>
    ...
</ivy-module>


Then emma plugin and my property will be accessible in my submodule. I can
give you more detail on this if you want, i'll update the documentation
soon.
Combining meta-build feature with module-inheritance could be really
powerful.




I also noticed that you've created a plugin to generate IDE's configuration
files. I haven't tested it yet but looks like promosing.
Is eclipse with IvyDE supported ?

Thanks for your interest
-- 
Jean Louis Boudart
Independent consultant
Project Lead http://www.easyant.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message