You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Benjamin Damm <bd...@silverspringnet.com> on 2008/11/15 02:12:31 UTC

ivy:install deletes files out of my repository. ?

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/[artifact]-[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

Re: ivy:install deletes files out of my repository. ?

Posted by Maarten Coene <ma...@yahoo.com>.
Please open a JIRA issue and attach sample build.xml, settings.xml, ivy.xml and verbose console output there.

Maarten




----- Original Message ----
From: Benjamin Damm <bd...@silverspringnet.com>
To: ivy-user@ant.apache.org
Sent: Monday, November 17, 2008 11:01:34 PM
Subject: Re: ivy:install deletes files out of my repository. ?

Well, I'm at my wits end here.  useOrigin="false" is not helping yet 
still .jar files are vanishing from my repository.  It's exceptionally 
frustrating and if anyone has seen this before I would very much like to hear 
anything you might have learned.

Thank you,
-Ben

On Friday 14 November 2008 06:02:50 pm Benjamin Damm wrote:
> 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



      

Re: ivy:install deletes files out of my repository. ?

Posted by Benjamin Damm <bd...@silverspringnet.com>.
Well, I'm at my wits end here.  useOrigin="false" is not helping yet 
still .jar files are vanishing from my repository.  It's exceptionally 
frustrating and if anyone has seen this before I would very much like to hear 
anything you might have learned.

Thank you,
-Ben

On Friday 14 November 2008 06:02:50 pm Benjamin Damm wrote:
> 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

Re: ivy:install deletes files out of my repository. ?

Posted by Benjamin Damm <bd...@silverspringnet.com>.
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