Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to create parent directories for tracking file .lastUpdated

Tags:

java

maven

I've added com.spotify:dockerfile-maven-plugin:1.4.3 to my POM and it s unable to complete because of the following u

[INFO] --- dockerfile-maven-plugin:1.4.3:build (default) @ server-api --- Downloading: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-modules-base/2.9.4/jackson-modules-base-2.9.4.pom [WARNING] Failed to create parent directories for tracking file /home/alex/.m2/repository/com/fasterxml/jackson/module/jackson-modules-base/2.9.4/jackson-modules-base-2.9.4.pom.lastUpdated

Which, in turn, causes:

[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.3:build (default) on project server-api: Execution default of goal com.spotify:dockerfile-maven-plugin:1.4.3:build failed: Plugin com.spotify:dockerfile-maven-plugin:1.4.3 or one of its dependencies could not be resolved: Failed to collect dependencies at com.spotify:dockerfile-maven-plugin:jar:1.4.3 -> com.spotify:docker-client:jar:shaded:8.11.4 -> com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.9.4 -> com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.4: Failed to read artifact descriptor for com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.4: Could not transfer artifact com.fasterxml.jackson.module:jackson-modules-base:pom:2.9.4 from/to central (https://repo.maven.apache.org/maven2): /home/alex/.m2/repository/com/fasterxml/jackson/module/jackson-modules-base/2.9.4/jackson-modules-base-2.9.4.pom.part.lock (No such file or directory) -> [Help 1]

like image 907
aclowkay Avatar asked Jun 17 '18 10:06

aclowkay


3 Answers

It had happened for us because some part of /.m2/repository was not having correct permissions.

like image 193
Kondal Kolipaka Avatar answered Nov 18 '22 04:11

Kondal Kolipaka


I removed ~/.m2/ and it worked

like image 35
aclowkay Avatar answered Nov 18 '22 05:11

aclowkay


I tried changing permissions of .m2 folder and repository. No luck.

Finally updated maven from 3.6.0 to 3.6.3 (latest) and it worked!

like image 1
Abinaya Veluswamy Avatar answered Nov 18 '22 05:11

Abinaya Veluswamy