What should be in </distributionManagement> url

27
September 14, 2021, at 11:30 PM

I'm trying to run a java (mvn) project by Jenkins job using the pipeline.

the cloning and the verify success but the deploy doesnt.

this is the error i got:

[main] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project create_pass_criteria: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

i am trining to fix it by adding this code to my pom.xml

<distributionManagement>
        <repository>
            <uniqueVersion>false</uniqueVersion>
            <id>corp1</id>
            <name>Corporate Repository</name>
            <url>file:///home/myfolder/.m2</url>
            <layout>default</layout>
        </repository>
    </distributionManagement>

but how can i find the url that i should use ?

Thanks very much.

Answer 1

Usually you have two different entries in distributionManagement. One for releases and one for snapshots. This the url of your internal repository manager:

  <distributionManagement>
    <repository>
      <name>release repo</name>
      <id>releases</id>
      <url>https://repomanager.com/base/maven-releases</url>
    </repository>
    <snapshotRepository>
      <name>snapshots repo</name>
      <id>snapshots</id>
      <url>https://repomanager.com/base/maven-snapshots</url>
    </snapshotRepository>
  </distributionManagement>

The <id>..</id> references the entries in settings.xml file for authentication. The credentials should be configured in credentials store of Jenkins... (config file provider plugin in Jenkins is very helpful in such cases)

READ ALSO
Need Help -- Hide Options From Select when Selected --

Need Help -- Hide Options From Select when Selected --

I'm having trouble hiding options when some other option is selected in select option: I have my form on default: Select1 on AS400 and Select2 on New Account which shows the inputs the user will fill out

38
Error in svm fit model with array of array data

Error in svm fit model with array of array data

I'm messing with an earthquake post-FFT datasetI'm trying to do classification with these data and I'm facing an error in model fitting which said ValueError: setting an array element with a sequence

55
How do you have PHP code on standby (idle)? [closed]

How do you have PHP code on standby (idle)? [closed]

Want to improve this question? Add details and clarify the problem by editing this post

33
React changing state of specific element on button click

React changing state of specific element on button click

I'm building a React component thats basically a dropdown of sorting optionsWhen a user clicks on a sort selection, the UI will update in accordance to the user's selection

15