tags:

views:

31

answers:

1

I'm trying to do the following. I would like to use subant to resolve all ivy dependencies and then if not resolved do compile for only the unresolved dependencies, but what I'm getting is once ivy fails to resolve it goes through all dependent directories and does a publish without doing resolve first. Please help.

Following is the target

<target name="resolve-comp-depen" depends="init, clean-lib, load-ivy">
   <ivy:resolve conf="${build.mode}" file="${ivy.file}" haltonfailure="false" failureproperty="version.notresolved" log="${ivy.log.mode}"/>
      <if>
          <equals args="${version.notresolved}" args2="true"/>
      <then>
          <do.subant dir="${proj.home}" includes="build.xml" root="${component}" target="publish}" excluderoot="true"/>
          <ivy:resolve conf="${build.mode}" file="${ivy.file}" failureproperty="version.notresolved" log="${ivy.log.mode}"/>
      </then>
      <else>
           <echo message="Resolved Successful: ${component}"/>
      </else>
      </if>
</target>

macro do.subant goes through ivy:buildlist and creates dependency list. I have tried to do resolve in publish as well, but it is failing

A: 

Removed the old answer. New to this site so still trying to figure out what is the correct way of doing things. Please be patient through my learning curve.

Rupal Desai