Failed to deploy artifacts: Could not find artifact

后端 未结 8 997
甜味超标
甜味超标 2021-02-03 21:28

I want to deploy a library to my companies remote repository.

It\'s the first time I want to deploy the library project to the remote repository.

I get the follo

相关标签:
8条回答
  • 2021-02-03 21:37

    Regarding the error:

    Failed to deploy artifacts: Could not transfer artifact
    

    Solution:

    A very simple way to fix this is just by changing/updating the version in the pom.xml file. Suppose 01.16.03 is already used then try using 01.16.04 instead. It should work.

    0 讨论(0)
  • 2021-02-03 21:38

    Okay...I encountered the same issue some days ago. And after fiddling around with all sort of permutations and combination, I finally arrived at the conclusion. Those who says that the reactor automatically sorts and resolves all dependencies on its own are incorrect. It seems that the link below describes it all. Kindly look at the last point under "Reactor Sorting" section:

    https://maven.apache.org/guides/mini/guide-multiple-modules.html#Reactor_Sorting

    It suggests that the order in which the modules are defined are taken into consideration when no other rules applies.

    I hope that helps other. :)

    0 讨论(0)
  • 2021-02-03 21:38

    It is because your Maven not able to find settings file. If deleting .m2 not work, try below solution

    Go to your JOB configuration

    than to the Build section

    Add build step :- Invoke top level maven target and fill Maven version and Goal

    than click on Advance button and mention settings file path as mention in image

    0 讨论(0)
  • 2021-02-03 21:40

    We have faced this issue. After couple of hours, we figured it is disk space issue in internal repository.

    0 讨论(0)
  • 2021-02-03 21:42

    Have you tried to add the server in your settings.xml file? The default settings xml is located in your ~/.m2/ directory. Should contain something like that:

    <servers>
            <server>
                <id>my-internal-nexus-repo</id>
                <username>yourUserName</username>
                <password>yourPassword</password>
            </server>
    </servers>
    

    Here is a link to the http://maven.apache.org/settings.html maven doc for adding servers.

    One other thing which might be a shot in the dark. I've noticed you are trying to connect to what the url suggests might be a Jenkins instance. Jenkins is a Continious Integration server and seemed strange to me that you are finding your repositories there. I would expect a Nexus url or something.

    0 讨论(0)
  • 2021-02-03 21:53

    In my case my server url in snapshotRepository section of pom.xml was pointing to http, while my internal repository was hosted in https.

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