ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Korobskiy <>
Subject ivy.resolved.configurations
Date Fri, 15 Jun 2007 20:40:36 GMT
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:

     [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: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}

     [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}/${}/${}-${project.revision}/${}-${project.revision}-ivy.xml"/>
      <!-- Assumes [module]-[revision]-ivy.xml deliver pattern and a particular structure
of a Releases repository -->
      <!-- Resolve for regular builds -->
      <property name="project.ivy.file" value="ivy.xml"/>
    <echo>ivy.resolved.configurations = ${ivy.resolved.configurations}</echo>

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

    <ivy:cachefileset conf="compile" setid="ivy.compile.fileset"/>

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>

View raw message