Publish Ivy SNAPSHOTS with Maven Metadata

I have an Ivy project that publishes its artifacts in the Nexus Maven repository. Then I need other Maven projects to use these banks as dependencies. I was able to get Ivy to create and download pom.xml along with banks, which works great. The problem is that when I use Ivy to publish a new version of SNAPSHOT, none of the Maven projects will get a new snapshot dependency, even if I do:

mvn clean install -U 

I noticed that Ivy is not publishing the maven-metadata.xml file in the repository - I assume this is a problem? If so, are there any ways to get Ivy to produce this?

+3
source share
2 answers

Ivy can be configured to read this file when resolving dependencies (see the "m2compatible" ibilio resolver attribute), but the publish task does not create or update this file .....

Apparently this is the clientโ€™s job to create and update the maven-metadata.xml file .... This is an undocumented function of the Maven repositories. (If someone can find where this is described, maybe the ivy bug can be fixed).

The standard working procedure is to periodically schedule a Nexus task to recover metadata files. Cm:

A more extreme solution is to use the Maven ANT task to complete the publishing phase ....

Comment on snapshot changes

Recently, I have come to the conclusion that snapshot releases are not worth the effort. Continuous delivery contributes to the concept that each assembly can potentially be released, and plush has an excellent buildnumber task that ensures that each assembly is unique. I find my build process easier when there is only one type of build.

Snapshots are a feature that is only required when sharing development artifacts with other projects using Maven. The IMHO dynamic revision functions ivy are more powerful because they allow the "last" revision during build. See how the deliver task combines with makepom in the following examples:

+3
source

I had a similar problem and found the following website helpful in solving it: http://ssinghvi.wordpress.com/2012/01/26/unable-to-retrieve-latest-artifact-from-sonatype-nexus- using-apache-ivy /

Basically use <ibiblio name="Maven Central" m2compatible="true" useMavenMetadata="false" root="http://โ€ฆ" />

+1
source

All Articles