org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='thirdparty' does not allow updating artifacts.

Sonatype JIRA | Larry Sanders | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This is an issue with an experimental plugin but I hope it gets some attention because I believe it's pretty widely used capability (since it's so awesome). Per the documentation on [P2 -Repository-Plugin page|https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin]: {quote} When this bundle gets deployed it will deploy two files /foo/bar/1.0/bar-1.0.pom and /foo/bar/1.0/bar-1.0.jar. Then the new plugin will read the manifest of bar-1.0.jar bundle and will automatically create /foo/bar/1.0/bar-1.0-p2Artifacts.xml (P2 artifacts.xml) and /foo/bar/1.0/bar-1.0-p2Content.xml (P2 content.xml). If this automatically generated will not suffice you can deploy your own ones that will override the automatically generated ones and be used in the aggregated P2 repository. {quote} One should be able to override the generated p2Artifact.xml and p2Content.xml. Unfortunately, in my case this only "works" if the repository allows redeployment. I am overriding the generated p2 xml's via tycho using eclipse-feature packaging. When it generates the p2 components, it does so with lowercase a and c in p2artifact.xml and p2content.xml. This may not have come up before because it appears to work correctly under linux because the filesystem can contain two files with the same name, but different case. The repository actually ends up having files like: {quote} thirdparty.feature-1.0.0.jar.sha1 thirdparty.feature-1.0.0-p2artifacts.xml thirdparty.feature-1.0.0-p2Artifacts.xml {quote} But under windows, this fails due to write policy enforcement (see partial stack below) Under linux, the onstore event still fires for the p2 bridge and it updates the p2 metadata and things seem to work fine. {code} 2014-09-25 15:47:43,881-0500 TRACE [qtp1825146578-61] deployment org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /com/perceptivesoftware/pif/thirdparty.feature/1.0.0/thirdparty.feature-1.0.0-p2artifacts.xml --> C:\temp\nexus-2.9.1-02-bundle\sonatype-work\nexus\storage\thirdparty\com\perceptivesoftware\pif\thirdparty.feature\1.0.0\thirdparty.feature-1.0.0-p2artifacts.xml 2014-09-25 15:47:43,883-0500 TRACE [qtp1825146578-61] deployment org.sonatype.nexus.content.internal.ContentServlet - Exception org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='thirdparty' does not allow updating artifacts. at org.sonatype.nexus.proxy.repository.AbstractRepository.enforceWritePolicy(AbstractRepository.java:1205) ~[nexus-core-2.9.1-02.jar:2.9.1-02] at org.sonatype.nexus.proxy.maven.maven2.M2Repository.enforceWritePolicy(M2Repository.java:290) ~[nexus-core-2.9.1-02.jar:2.9.1-02] {code}

    Sonatype JIRA | 3 years ago | Larry Sanders
    org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='thirdparty' does not allow updating artifacts.

    Root Cause Analysis

    1. org.sonatype.nexus.proxy.IllegalRequestException

      Repository with ID='thirdparty' does not allow updating artifacts.

      at org.sonatype.nexus.proxy.repository.AbstractRepository.enforceWritePolicy()
    2. ${project.groupId}:${project.artifactId}
      M2Repository.enforceWritePolicy
      1. org.sonatype.nexus.proxy.repository.AbstractRepository.enforceWritePolicy(AbstractRepository.java:1205)[nexus-core-2.9.1-02.jar:2.9.1-02]
      2. org.sonatype.nexus.proxy.maven.maven2.M2Repository.enforceWritePolicy(M2Repository.java:290)[nexus-core-2.9.1-02.jar:2.9.1-02]
      2 frames