ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t4rockets <>
Subject retrieve fails to download updated/replaced JAR from a filesystem resolver
Date Mon, 13 Aug 2018 14:51:20 GMT
Using the dependence example, it has been updated so that build time (new
and equal to now via <tstamp> task) and version number properties are
written to the dependee version file.  The dependee Java code was also
updated to print the build time and version number.  The Java code was
update to see what build time property was in the downloaded JAR.

The issue seen is that if the dependee JAR is updated/replaced (compiled
again with a new build time property) but no version change using the
publish overwrite="true" option, the depender Ivy retrieve will not
downloaded the updated JAR (same version, different build time and
therefore a different check sum).  It appears that Ivy knows there is an
update based on the debug information, but the download does not happen.

The filesystem repository is being used to support local build so that
developer can build and test the code changes locally without a repository
manager (i.e, Nexus).

If the version number is updated, the depender Ivy retrieve will download
the updated dependee JAR as expected.

This issue has been recreated against 2.4.0 and 2.5.0-rc1 and show both the
same behavior.

Code added to the dependee "jar" target using the ant-contrib if task
            <format property="build.time" pattern="dd-MMMM-yyyy+HH:mm:ss"/>
        <propertyfile file="${classes.dir}/">
            <entry key="build.time" value="${build.time}"/>
            <equals arg1="${option.include.version}" arg2="true"/>
            <propertyfile file="${classes.dir}/">
                <entry key="version" type="int" operation="+" default="0"/>
Code update for the source code:
            String buildTime = p.getProperty("build.time");
            if (version != null && buildTime != null ) {
                return version + "-" + buildTime;

The sequence of events to create:

   - cd dependence
   - ant
   - ant all
      - Note the build time and version from the depender task
   - cd dependee
   - ant publish
   - ant publish
      -  Note the new build time and version for each publish
   - cd ../depender
   - ant
      - Note the build time and version for the run task (should be the
      same as the last dependee publish task)
   - cd ../dependee
   - ant publish -Doption.include.version=false
   - ant publish -Doption.include.version=false
      - Note the new build time and but the version did not update
   - cd ../depender
   - ant
      - Note the build time does not match the latest dependee JAR (updated
      build time, same version).  The build time is from the JAR the last time
      the version was updated.

Several options have been tried on the depender ivy:resolve task without
success.  Is there some way to get the retrieve to download the updated
dependee JAR when it is only updated/replaced (no new version)?


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