incubator-easyant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Enderling <T.Enderl...@intershop.de>
Subject RE: Build configurations
Date Fri, 22 Mar 2013 08:34:20 GMT
Hi,

thank you. 

I was just wondering whether there is some hidden semantics for the dependencies/artifacts
contained in the active build configurations - something in the way of:
A plugin for compiling Java determines the classpath by running a resolve on the Ivy file
_with the active build configurations_. So when I switch configurations with "-C", dependencies
will switch as well. But obviously there is not (and it would probably be dangerous to implement
something like that anyway). Its just a bit misleading then to use the same configurations
in the example for different build profiles as well as for different sets of dependencies.

By the way, there seems to be a bug in the way that properties are handled in different build
configurations. The interface EasyAntModuleDescriptor grants access on properties in a map
whose key is the property name:

    /**
     * Get all the properties loaded inside the &lt;easyant&gt; tag.
     * 
     * @return a map of properties
     */
    Map<String, PropertyDescriptor> getProperties();

So there can only be one PropertyDescriptor for each given property. (And a single PropertyDescriptor
can also only hold one value.) If you now specify two <ea:property> elements for different
build configurations with different values, like in the example in [1], only the last one
will be stored. (So in the example it will be actually only be present for configuration "linux"
with value "foobar" and not set for configuration "windows" at all.)

<ea:property name="foo" value="bar" conf="windows"/>
<ea:property name="foo" value="foobar" conf="linux"/>

You should replace the map with a list or add a parameter to pass in active configurations.
I didn't have time yet to look if this issue is already filed/file it myself.

Best regards,
Tim Enderling

[1] http://incubator.apache.org/easyant/history/trunk/howto/BuildConfigurations.html.

> -----Original Message-----
> From: Jean-Louis Boudart [mailto:jeanlouis.boudart@gmail.com]
> Sent: Donnerstag, 21. März 2013 21:22
> To: easyant-dev@incubator.apache.org
> Subject: Re: Build configurations
> 
> EasyAntMagicNames.ACTIVE_
> BUILD_CONFIGURATIONS is currently setted in
> EasyAntEngine.initProject(Project project) method.
> 
> If you're running easyant through command it will be setted with "-C"
> switch
> > easyant -C yourbuildConfiguration
> 
> This property is then read by LoadModule task.
> 
> The feature works pretty well, but i agree that there are some misspelled
> method, variables in easyant-core code itself on this topic.
> 
> 
> 2013/3/21 Jean-Louis Boudart <jeanlouis.boudart@gmail.com>
> 
> > Hi,
> > Easyant is build on top of ivy. Our entry point is a module descriptor (a
> > pure ivy file) where you will describe:
> >  * standard ivy informations such as project name / version /
> dependencies
> >  * informations introduced by easyant like :
> >     - properties
> >     - plugins
> >
> >
> > You can associate the following things with a particular build
> > configuration:
> >
> >    1. Property values
> >    2. Plugins
> >    3. Dependencies, artifacts (de facto as we uses ivy :))
> >
> > We wanted to make build configuration aware of both ivy
> > (dependencies,artifacts) and easyant stuff. So we chose to plug our
> > mechanism into an existing ivy feature instead of introducing a new
> concept.
> >

-- snip --

Mime
View raw message