ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shcherbakov" <sshcherba...@echelon.de>
Subject RE: Publication of the artifacts with classifiers to the maven repository
Date Fri, 26 Jun 2009 18:06:46 GMT
Hi all,

As I search through the mail list my problem appears to be a pretty
known problem.

Once I was able to get ivy cache updated using solution suggested here:
http://www.nabble.com/Trouble-getting-latest-SNAPSHOT-deps-td23893234.ht
ml

Although that looks rather like workaround, since I have to apply either
latest.integration or some version with + at the end to the dependency
to get cache updated.
Thus, I cannot use the same ivy.xml file for both "snapshot" and
"release" builds as I would expect passing version to the dependency
element through the ant property like
rev="${build.version}".

Unfortunately, I cannot reproduce successful cache update any more even
with latest.integration as dependency version.

Shouldn't changing="true" on dependency work without requiring rev="
latest.integration"?

It appears also that the problem is not [directly] connected with the
"classifier" attribute I use.
It persists for projects/artifacts without "classifier" too.

Best Regards,
Sergey Shcherbakov.

-----Original Message-----
From: Sergey Shcherbakov [mailto:sshcherbakov@echelon.de] 
Sent: Friday, June 26, 2009 3:40 PM
To: ivy-user@ant.apache.org
Subject: RE: Publication of the artifacts with classifiers to the maven
repository

My problem is actually the same as described here:

http://www.nabble.com/Changing-revision-does-not-update-the-cache-td2342
8229.html

It is not solved though.

Best Regards,
Sergey Shcherbakov.

-----Original Message-----
From: Sergey Shcherbakov [mailto:sshcherbakov@echelon.de] 
Sent: Friday, June 26, 2009 1:41 PM
To: ivy-user@ant.apache.org
Subject: Publication of the artifacts with classifiers to the maven
repository

Hi all,

 

Understanding advantages of the Ivy vs. Maven I am using Ivy as
dependency managing tool for our non-Java projects.

But we have also some Java maven projects that cannot be migrated to Ivy
now.

 

So I am trying to use homogenous dependency environment where Ivy
projects sometimes depend on the Maven artifacts in the maven
repository.

 

Recently I found a problem.

 

An Ivy project A publishes it's "snapshot" artifact to the maven
repository so that it can be used by other maven projects.

There is another Ivy project B that among others depends on artifacts
generated by project A.

 

In case of snapshot build the artifact gets changed without changing its
version number.

The project A overwrites the artifact in the repository with each
snapshot build properly.

 

The project B finds this artifact for the first time, downloads it to
the ivy cache and uses OK.

 

The problem is that the project B doesn't notice that the artifact gets
changed in the maven repo and doesn't update the cache although
changing="true" is specified for that dependency. Thus outdated version
of the A comes into the project B build.

 

The resolution in debug mode shows :

[ivy:resolve] A is changing, but has not changed: will trust cached
artifacts if any

 

There was though some problem with ivy repo file parsing (shown only in
debug mode):

 

[ivy:resolve]   problem while parsing cached ivy file for:
com.echelon.es#LnsNative;4.03.000-SNAPSHOT: [xml parsing: ivy-4.03.000-

SNAPSHOT.xml:15:85: cvc-complex-type.3.2.2: Attribute 'classifier' is
not allowed to appear in element 'artifact'. in file:/C:/Doc

uments%20and%20Settings/ss/.ivy2/cache/A/ivy-4.03.000-SNAPSHOT.xml

 

The cached ivy file do really contains classifier attribute but doesn't
have namespace prefix and no xmlns declaration, although the initial
project A ivy.xml file had that definitions. Obviously, when Ivy
published artifacts (or when the cache ivy file was generated) the
namespace prefixes were removed by Ivy. Can that be a reason of not
updating snapshot artifacts in cache?

 

Best Regards,

Sergey Shcherbakov.


Mime
View raw message