ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject Re: ivy.resolved.configurations
Date Sat, 16 Jun 2007 19:18:05 GMT
The version on the trunk allow now to scope the resolution (and the
configurations).  See [1].  I think it will solve your problem.  If
you want to try it, you could build ivy from the trunk.

[1] https://issues.apache.org/jira/browse/IVY-366

Gilles

2007/6/15, Dmitriy Korobskiy <dkroot1@gmail.com>:
> Hi all,
>
> I'm using Ivy 1.4.1 and I am running into a problem with
> ivy.resolved.configurations property.
>
> Here is a somewhat simplified use case:
>
> ant dist test
>
> dist target does :
>
> 1. Ivy configure
>
> 2. Ivy resolve for all configurations
> ivy.resolved.configurations = compile, war, ear, meta-data, ide
>
> 3. Ivy resolve for meta-data
> ivy.resolved.configurations = meta-data
>
> 4. Ivy resolve for ear
> ivy.resolved.configurations = ear
>
> test target does :
>
> 1. Ivy configure
> When I output ivy.resolved.configurations before and after <ivy:configure>, it
> is empty, as it should be.
>
> 2. Ivy resolve for compile
> ivy.resolved.configurations = compile, war, ear, meta-data, ide ?!?
>
> Here our build fails because it is trying to skip compile resolution
> based on ivy.resolved.configurations value which is incorrect.
>
> The last resolve Ivy knows about was for the ear config.
>
> What totally blew my mind is the fact that ivy.resolved.configurations value
> changes mysteriously between one target (step 1) and another which follow the
> first immediately (step 2). Here is the output:
>
> -init.ivy:
>      [echo] ivy.resolved.configurations = ${ivy.resolved.configurations}
> [ivy:configure] Loading jar:file:/M:/korobskd_dev/Foundation/tools/ivy/ivy-1.4.1/ivy-1.4.1.jar!/fr/jayasoft/ivy/ivy.properties
> [ivy:configure] :: configuring :: file = M:\korobskd_dev\Foundation\ivyRepository\conf\ivyconf.xml
> Overriding previous definition of reference to ivy.instance
>      [echo] ivy.resolved.configurations = ${ivy.resolved.configurations}
>
> ivy.resolve.compile:
>      [echo] ivy.resolved.configurations = compile, war, ear, meta-data, ide
> Overriding previous definition of reference to ivy.compile.fileset
>
> ... and the targets:
>
>  <target name="-init.ivy">
>     <echo>ivy.resolved.configurations = ${ivy.resolved.configurations}</echo>
>     <ivy:configure file="${era.ivy.repository}/conf/ivyconf.xml"/>
>     <!-- At this point ivy.resolved.configurations should be empty -->
>
>     <c:if><isset property="dist.environment"/><then>
>       <!-- Resolve for distEnv -->
>       <property name="project.ivy.file" value="${releases.home}/${ant.project.name}/${ant.project.name}-${project.revision}/${ant.project.name}-${project.revision}-ivy.xml"/>
>       <!-- Assumes [module]-[revision]-ivy.xml deliver pattern and a particular structure
of a Releases repository -->
>     </then><else>
>       <!-- Resolve for regular builds -->
>       <property name="project.ivy.file" value="ivy.xml"/>
>     </else></c:if>
>     <echo>ivy.resolved.configurations = ${ivy.resolved.configurations}</echo>
>   </target>
>
>   <target name="ivy.resolve.compile" depends="-init.ivy">
>     <echo>ivy.resolved.configurations = ${ivy.resolved.configurations}</echo>
>     <c:if><not><contains string="${ivy.resolved.configurations}" substring="compile"/></not><then>
>       <!-- Ivy resolve for "compile" configuration -->
>       <ivy:resolve file="${project.ivy.file}" conf="compile"/>
>       <echo>ivy.resolved.configurations = ${ivy.resolved.configurations}</echo>
>     </then></c:if>
>
>     <ivy:cachefileset conf="compile" setid="ivy.compile.fileset"/>
>   </target>
>
> I'm wondering whether it is a known problem. If not, I can submit a JIRA for it.
>
> Dmitriy <1-127-441 @ICQ, DKroot @Skype>
> <DKroot1 @AIM, dkroot1_at_gmail_dot_com @Google Talk or @MSN, dk_root @Yahoo>
>
>

Mime
View raw message