Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
3.17.0
Description
Reproduce steps.
- Start with stock configuration, so the "maven-releases" hosted repository's deployment policy is "disable redeploy"
- Upload a pom and a pom.sha1 file to the "maven-releases" repository using curl, making sure the checksum in the pom.sha1 file is incorrect
- Create and run an "repair - rebuild maven metadata" task with the "rebuild checksums" option enabled against the "maven-releases" repository.
This will fail:
2019-07-19 13:06:17,620-0500 ERROR [quartz-3-thread-2] *SYSTEM org.sonatype.nexus.repository.maven.tasks.RebuildMaven2MetadataTask - Failed to run task 'Rebuilding Maven Metadata of maven-releases' on repository 'maven-releases'
org.sonatype.nexus.repository.IllegalOperationException: Repository does not allow updating assets: maven-releases
at org.sonatype.nexus.repository.storage.StorageTxImpl.maybeDeleteBlob(StorageTxImpl.java:820)
at org.sonatype.nexus.repository.storage.StorageTxImpl.attachBlob(StorageTxImpl.java:716)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
If you then change the deployment policy of the repository to "allow redeploy" it will work.
Expected: The rebuild metadata task shouldn't take into account the deployment policy of the repository, it should always work.
Attachments
Issue Links
- duplicates
-
NEXUS-19906 hosted repo Deployment policy other than 'Allow redeploy' can prevent administrative metadata updates
-
- Open
-