I think I've found the problem. If the destination repository is also in the
source repository chain, then useOrigin must be false on the cache.
A check for this might be useful. Now I'm faced with the minor problem of
toggling useOrigin="false" when I want to import from m2, and
useOrigin="true" for normal operations.
-Ben
On Friday 14 November 2008 05:12:31 pm Benjamin Damm wrote:
> Hello,
>
> I'm trying to use the ivy:install task to pull modules from maven into our
> local (p4 managed) repository. But when I use overwrite=true (to ease
> pulling large dependency trees such as spring-*) the ivy:install causes
> files to vanish. In particular jars. In some other cases the jars are
> "installed" as zero-byte files. There must be either a bug or something
> wrong with my setup:
>
> (from ivysettings.xml)
> <filesystem name="ivycontrib_m2">
> <artifact
> pattern="${ivycontrib.dir}/m2/[organisation]/[module]/[revision]/[type]s/[a
>rtifact]-[revision]. [ext]" />
> <ivy
> pattern="${ivycontrib.dir}/m2/[organisation]/[module]/[revision]/ivy.xml"
> /> </filesystem>
> <chain name="public_m2">
> <resolver ref="ivycontrib_m2"/> <!-- to prevent needless
> downloading of
> stuff we already have. -->
>
> <!-- official maven2 repo -->
> <ibiblio name="maven2" m2compatible="true" />
> ...
> (from build.xml)
> <ivy:install from="public_m2" to="ivycontrib_m2" module="${module}"
> revision="${revision}" transitive="${transitive}" organisation="${org}"
> overwrite="true"/>
> (cmd line)
>
> ant
> install -Dorg=org.springframework -Dmodule=spring-jdbc -Drevision=2.5.4
> -Doverwrite=true
>
> ----
>
> So, this all causes a frustrating and endless cycle of removing or
> truncating jars. What could I be doing wrong here?
>
> Thank you,
> -Ben
--
Benjamin Damm
Silver Spring Networks
650-298-4200 x201