1

I have checked question but of no avail, moreover my project is not multi-module maven project. pom.xml file

Issue

My project version is 5.5 and which I am trying to deploy to maven repo. But mvn ddeploy fails with following error -

[ERROR] 
[ERROR] Nexus Staging Rules Failure Report
[ERROR] ==================================
[ERROR] 
[ERROR] Repository "comseleniumtests-1056" failures
[ERROR]   Rule "RepositoryWritePolicy" failures
[ERROR]     * Artifact updating: Repository ='releases:Releases' 
does not allow updating artifact='/com/seleniumtests/seleniumtestsframework/5.4/seleniumtestsframework-5.4-sources.jar'
[ERROR]     * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/seleniumtests/seleniumtestsframework/5.4/seleniumtestsframework-5.4-javadoc.jar'
[ERROR]     * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/seleniumtests/seleniumtestsframework/5.4/seleniumtestsframework-5.4.pom'
[ERROR]     * Artifact updating: Repository ='releases:Releases' does not allow updating artifact='/com/seleniumtests/seleniumtestsframework/5.4/seleniumtestsframework-5.4.jar'
[ERROR] 
[ERROR] 

I am on Apache Maven 3.3.9 and was able to deploy till version 5.4 but deploying version 5.5 ends up uploading version 5.4 again. What am I doing wrong?

Tarun
  • 3,456
  • 10
  • 48
  • 82
  • To be sure it does not hit cache or anything you could try `mvn clean deploy` – Albert Bos Jul 25 '18 at 17:37
  • Is your project version *actually* 5.5 in the pom? Because I would expect this error to occur if it were 5.4 and you were trying to deploy a second time. Please post the pom itself (maybe not the specific dependencies, but at least the general structure, with the ``, artifactId, groupId, and version, etc.) – Roddy of the Frozen Peas Jul 25 '18 at 17:39
  • @RoddyoftheFrozenPeas I had posted pom.xml file. It is an opensource project. – Tarun Jul 25 '18 at 17:45
  • @AlbertBos `mvn clean deploy` did the trick :) Please post it as answer and I would accept it. Though I yet don't get why it was trying to upload older version 5.4 along with 5.5 :-? – Tarun Jul 25 '18 at 17:48
  • Links to external code are OK on SO. You need the code to be *in the question itself.* – Roddy of the Frozen Peas Jul 25 '18 at 17:51
  • Noted. Given that answer is not related pom.xml itself I am leaving the question as it is unless some one objects. – Tarun Jul 25 '18 at 17:53

1 Answers1

5

To be sure it does not hit cache or anything you could try mvn clean deploy. I think maven checks if the source files have been changed. If only the pom.xml gets updated, the target/ folder won't be recreated and that one still contains 5.4

Albert Bos
  • 2,012
  • 1
  • 15
  • 26