The following crudely describes the typical requests made by Maven 3.0.4 during a single module artifact deployment, using maven-deploy-plugin.
Generally
- Maven requests sha1 first and only requests md5 if sha1 not found
- Maven doesn't stop if maven-metadata.xml cannot be retrieved due to 404, it just doesn't merge it
- If GAV maven-metadata.xml cannot be retrieved for a SNAPSHOT artifact, Maven explicitly requests non-timestamped artifacts, like
${artifactid}-${version}-SNAPSHOT.pom
, instead of a explicit timestamped version - Maven deploys main artifact first, the pom last
- other than sha1 and maven-metadata case above, Maven stops if it receives any 4xx or 5xx response
Regular Artifact
SNAPSHOT, NOT A REDEPLOY
-- get GAV maven-metadata.xml ( 404)
-- put main artifact + hashes (201)
-- put pom + hashes (201)
-- put other artifacts + hashes (201)
-- get GA maven-metadata.xml (404)
-- put GAV maven-metadata.xml + hashes (201)
-- put GA maven-metadata.xml + hashes (201)
SNAPSHOT, REDEPLOY
-- get GAV maven-metadata.xml (200) + sha1
-- put main artifact + hashes , timestamped based on previous metadata (201)
-- put pom + hashes (201), timestamped based on previous metadata
-- put other artifacts + hashes, timestamped based on previous metadata (201)
-- get GA maven-metadata.xml + sha1 (200), if sha1 404, then request md5
-- put GAV maven-metadata.xml + hashes (201) , mod based on retrieved metadata
-- put GA maven-metadata.xml + hashes (201) , mod based on retrieved metadata
RELEASE, NOT A REDEPLOY
-- put main artifact + hashes (201)
-- put pom + hashes (201)
-- put attached other artifacts + hashes (201)
-- get GA maven-metadata.xml (404)
-- put GA maven-metadata.xml + hashes (201)
RELEASE, REDEPLOY ( repo allows release redeploy )
-- put main artifact + hashes (201)
-- put pom + hashes (201)
-- put attached other artifacts + hashes (201)
-- get GA maven-metadata.xml (200) + sha1, if sha1 404, then request md5
-- put GA maven-metadata.xml + hashes (201)
Maven Plugin Artifact
SNAPSHOT, NOT A REDEPLOY
-- get GAV maven-metadata.xml ( 404)
-- put main artifact + hashes (201)
-- put pom + hashes (201)
-- get GA maven-metadata.xml (404)
-- get G maven-metadata.xml (404)
-- put GAV maven-metadata.xml + hashes (201)
-- put GA maven-metadata.xml + hashes (201)
-- put G maven-metadata.xml + hashes (201)
SNAPSHOT, REDEPLOY
-- get GAV maven-metadata.xml (200) + hash
-- put main artifact + hashes , timestamped based on previous metadata (201)
-- put pom + hashes (201), timestamped based on previous metadata
-- get GA maven-metadata.xml + sha1 (200), if sha1 404, then request md5
-- get G maven-metadata.xml + sha1 (200), if sha1 404, then request md5
-- put GAV maven-metadata.xml + hashes (201)
-- put GA maven-metadata.xml + hashes (201)
-- put G maven-metadata.xml + hashes (201)
RELEASE, NOT A REDEPLOY
-- put main artifact + hashes (201)
-- put pom + hashes (201)
-- get GA maven-metadata.xml (404)
-- get G maven-metadata.xml (404)
-- put GA maven-metadata.xml + hashes (201)
-- put G maven-metadata.xml + hashes (201)
RELEASE, REDEPLOY ( repo allows release redeploy )
-- put main artifact + hashes (201)
-- put pom + hashes (201)
-- get GA maven-metadata.xml (201) + sha1, if sha1 404, then request md5
-- get G maven-metadata.xml (201) + sha1, if sha1 404, then request md5
-- put GA maven-metadata.xml + hashes (201)
-- put G maven-metadata.xml + hashes (201)