Maven: repository element was not specified in the POM inside distributionManagement?

后端 未结 5 965
一整个雨季
一整个雨季 2020-12-08 08:47

I am trying to run the command, mvn release:perform, but I get this error:

Failed to execute goal
org.apache.maven.plugins:maven-de         


        
相关标签:
5条回答
  • 2020-12-08 09:29

    I got the same message ("repository element was not specified in the POM inside distributionManagement element"). I checked /target/checkout/pom.xml and as per another answer and it really lacked <distributionManagement>.

    It turned out that the problem was that <distributionManagement> was missing in pom.xml in my master branch (using git).

    After cleaning up (mvn release:rollback, mvn clean, mvn release:clean, git tag -d v1.0.0) I run mvn release again and it worked.

    0 讨论(0)
  • 2020-12-08 09:35

    For me, this was something as simple as a missing version for my artifact - "1.1-SNAPSHOT"

    0 讨论(0)
  • 2020-12-08 09:44

    You can also override the deployment repository on the command line: -Darguments=-DaltDeploymentRepository=myreposid::default::http://my/url/releases

    0 讨论(0)
  • 2020-12-08 09:44

    The ID of the two repos are both localSnap; that's probably not what you want and it might confuse Maven.

    If that's not it: There might be more repository elements in your POM. Search the output of mvn help:effective-pom for repository to make sure the number and place of them is what you expect.

    0 讨论(0)
  • 2020-12-08 09:45

    Review the pom.xml file inside of target/checkout/. Chances are, the pom.xml in your trunk or master branch does not have the distributionManagement tag.

    0 讨论(0)
提交回复
热议问题