Is there a way to instruct Maven to not look for artifact descriptor for some dependencies? I am struggling with this problem :
[ERROR] Failed to execute goal on project zws-consumer: Could not resolve dependencies for project com.etech.zws:zws-consumer:jar:2.9.28.RC1-SNAPSHOT: Failed to collect dependencies at com.ptv:xlocate-cxf-client:jar:1.20.1.3: Failed to read artifact descriptor for com.ptv:xlocate-cxf-client:jar:1.20.1.3: Could not find artifact com.ptvag.xserver.build:xserver-parent:pom:1.20.1.0 in artifactory-etech-releases (https://artifactory.etech.delivery/artifactory/etech/releases/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project zws-consumer: Could not resolve dependencies for project com.etech.zws:zws-consumer:jar:2.9.28.RC1-SNAPSHOT: Failed to collect dependencies at com.ptv:xlocate-cxf-client:jar:1.20.1.3
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)
...
So the probelm seems clear:
Could not find artifact com.ptvag.xserver.build:xserver-parent:pom:1.20.1.0 in artifactory-etech-releases (https://artifactory.etech.delivery/artifactory/etech/releases/)
The problem is when I look at the repository https://artifactory.etech.delivery/artifactory/etech/releases/
there isn't any dependency with this name com.ptvag.xserver.build:xserver-parent
but all other dependencies are there.
Since it just about artifact description, is there a way to tell maven to ignore that. All dependencies with that description are in my .m2
but the command mvn clean install
fails because of this error.
The build passed 2 days ago, but I am trying to migrate the project from jdk8 to 11 and I am facing this issue since 1 day.
Related dependencies are:
<dependency>
<groupId>com.ptv</groupId>
<artifactId>xlocate-cxf-client</artifactId>
<version>1.20.1.3</version>
</dependency>
<dependency>
<groupId>com.ptv</groupId>
<artifactId>xroute-cxf-client</artifactId>
<version>1.20.1.3</version>
</dependency>
<dependency>
<groupId>com.ptv</groupId>
<artifactId>xtour-cxf-client</artifactId>
<version>1.20.1.3</version>
</dependency>
As you can see the groupId
of those dependencies is com.ptv
but the exception is about com.ptvag
. I'm a little confused because on the repository there isn't a com.ptvag
groupId.
EDIT
After some searches I found where that dependency was, please look below:
Now I don't understand why maven try to download it.
Thanks for your help.
You are probably missing a parent pom of one of your dependencies. Without this parent pom, it is not possible to build the tree of all transitive dependencies (the parent pom might contain dependencies or dependencyManagement entries). So the build does not work.
The artifact com.ptv:xlocate-cxf-client:jar:1.20.1.3
is a (transitive) dependency of your project. Look there, if the described POM is the parent of this project. If so, you need it for the build.