ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kermitt <>
Subject ivy:install
Date Wed, 09 Jan 2008 23:41:51 GMT

I attached my previous post from user mailling. I take a moment tonight to
figure out the error.

In my mind, I wanted to synchronize two repositories which is not possible
regarding the code. As if overwrite is set to false an IOException is thrown
as soon as an existing artifact is found. 

I feel like synchronization would be a good feature, what do you think of?  

There is different way to handle the feature but it would requires API
change somehow. We need distingate the case of an exception of Input Output
and the "file already exist" case.

Some suggestions:

void publish(Artifact artifact, File src, boolean overwrite) throws
IOException, ExistingArtifactUncheckedException;

=> Would unify error message regarding duplicate as IOException is filled
with various message according the resolver.

void publish(Artifact artifact, File src, boolean overwrite,boolean
skipExistingFile) throws IOException;


Trace confuse me a bit , I am using SFTP and I would suggest to add to line 137:
            if (!overwrite && checkExistence(destination, c)) {
                throw new IOException("destination file " + destination + "
exists and overwrite == true");



I have two repo : local , integration

I tried to use ivy:install to migrate my modules between them. 

After publishing in local, i start a new task to migrate new dependencies I
could have added to my local repo during my developpement:

<ivy:install organisation="${ivy.organisation}" module="${ivy.module}"
revision="${ivy.revision}" from="local" to="integration" transitive="true"

[ivy:install] :: installing;1.53 ::
[ivy:install] :: resolving dependencies ::
[ivy:install] 	found;1.53 in fs-local
[ivy:install] 	found foo#AntCommon;1.39D in remote-private
[ivy:install] 	found junit#junit;3.8.1 in remote-private
[ivy:install] :: downloading artifacts to cache ::
[ivy:install] downloading
d:\javadev\local-repository\\Basic\jars\Basic-1.53.jar ...
[ivy:install] .. (1kB)
[ivy:install] .. (0kB)
[ivy:install] 	[SUCCESSFUL ];1.53!Basic.jar (20ms)
[ivy:install] :: installing in remote ::
[ivy:install] 	published Basic to
[ivy:install] 	published ivy to
[ivy:install] missing artifact foo#AntCommon;1.39D!
d:\javadev\repository\.ivy-cache\foo\AntCommon\zips\ file
does not exist

C:\javadev\src\AntCommon\src\build-common.xml:321: impossible to install;1.53: destination file exists and
overwrite == true

Total time: 1 minute 1 second

I tried with ivy 1.4.1 and ivy 2.0 beta 1 same error, if I put transitive to
false I don't get this error. I guess there is an issue with the artifact
being reprocessed one more time when transitive. 
I don't really want to put overwrite="true" because I have so many artifact
it would take too long ...

View this message in context:
Sent from the Ant - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message