Skip to content

Commit a0fc800

Browse files
committed
bump-pom-scijava: after deploying to OSS Sonatype, invalidate cache
Our primary mirror is the ImageJ Maven repository. This also happens to be the go-to place for the maven-helper when looking for the latest version. Therefore, let's just use the RESTful API of the Nexus instance that is the ImageJ Maven repository to invalidate the cache of maven-metadata.xml just after releasing to OSS Sonatype. That way, the maven-helper will trigger that file to be fetched from OSS Sonatype, merge it with what we have in the local Releases repository (that was formerly the official place where we deployed pom-scijava), and everything is groovy. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b6eff23 commit a0fc800

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bump-pom-scijava.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ die "Failed to remove intermediate $pom.new"
223223
commit_and_push "Increase pom-scijava version to $new_version" \
224224
-m "$message" $pom
225225

226-
test -n "$skip_commit" ||
227-
mvn -DupdateReleaseInfo=true -Psonatype-oss-release \
228-
deploy nexus-staging:release
226+
NEXUS_URL=http://maven.imagej.net/
227+
SONATYPE_PROXY=$NEXUS_URL/service/local/data_cache/repositories/sonatype/content
228+
test -n "$skip_commit" || {
229+
mvn -DupdateReleaseInfo=true -Psonatype-oss-release \
230+
deploy nexus-staging:release &&
231+
curl --netrc -i -X DELETE \
232+
$SONATYPE_PROXY/org/scijava/pom-scijava/maven-metadata.xml
233+
}

0 commit comments

Comments
 (0)