Click here to Skip to main content
15,880,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to build a maven project which has its artifacts in an azure feed.

The command I'm using is
mvn clean install


But there is an artifact which has .zip file in it. Previously it was working fine but all of a sudden due some unknown reason the build is failing with the following error message.

Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack (unpack-artifact_name) on project project_name_Servers: 
    Unable to resolve artifact. Could not transfer artifact com.project_name:project_name-support-maven-bom-artifact_name:zip:2.1 from/to 
    Azure_artifact_feed (https://feed_URL/maven/v1): 
    GET request of: com/project_name/project_name-support-maven-bom-artifact_name/2.1/project_name-support-maven-bom-artifact_name-2.1.zip from Azure_artifact_feed 
    failed


The network and connectivity seems fine, as other artifacts are getting downloaded.
How can I fix this?

What I have tried:

I have tried to delete .m2 and rerun the build, but it is not working and it is throwing the same error.
Posted
Updated 7-Feb-23 21:31pm
v2

1 solution

It seems that the Maven repositories tree has changed which means the file is no longer available in the repositories entered.

Check your .xml file and correct the path where necessary.

The solution to this problem is to double check your local Maven settings.xml configuration and assert you have the correct repositories configured where Maven can obtain this particular dependency.

Not entirely your case but the basic solution can be found in this article: How to use Enterprise Maven Repository credentials with settings.xml and pom.xml example[^]

If after doing so you are still having this issue then use Maven to get a dependency tree and effective POM to find out which component is requesting this dependency. These would be the command lines -

mvn clean package -X -e > mvninstall.txt 
mvn dependency:tree -Dverbose > mvnTree.txt 
mvn help:effective-pom -X > mvnpom.txt
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900