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]
It had happened for us because some part of /.m2/repository was not having correct permissions.
I removed ~/.m2/ and it worked
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!
Changing the file permissions using the following command:
sudo chmod 777 repository
solves the problem
Related
I'm new to maven and setting up maven for the first time. I'm getting following error with Java and hitting mvn install command.
Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for
org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (ht
tps://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clea
n-plugin-2.5.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non
-empty -
This would be better than a straight answer here ...
make a settings.xml in a hidden folder in your home for Maven
More info of the error:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.3:repackage (repackage) on project HelloWorldProject: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.4.3:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:2.4.3
with org.springframework.boot.experimental
Oh thanks, I see in the mvn repo that version 1.0.26.RELEASE is the highest version existing for spring-boot-thin-layout.
Please find the below logs :
[ERROR] Failed to execute goal on project hospital: Could not resolve dependencies for project
com.project_name.test.web:hospital:war:0.0.1-SNAPSHOT: Failed to collect dependencies at
com.example.test:example-child:jar:1.1.12-SNAPSHOT: Failed to read artifact descriptor for
com.example.test:example-child:jar:1.1.12-SNAPSHOT: Could not transfer artifact
com.example.test:example-parent:pom:1.1.12-SNAPSHOT from/to maven-central
(http://central.maven.org/maven2/): central.maven.org: Unknown host central.maven.org -> [Help 1]
Thanks in advance!
This failes likely due to an artifact downloaded earlier (in my case .m2/repository/org/geotools/geotools/19.1/geotools-19.1.pom) containing this as a specific repo, maybe even retrieved from a thirdparty repo.
Check your local artifacts for references to the repository, e.g. by this brute force approach:
grep -nr "central.maven.org" ~/.m2/repository/
Replacing/removing the dependency solved the issue.
I try to build my applivation and get followinf error message:
[ERROR] Failed to execute goal on project XXX: Could not resolve dependencies for project XXX:1.0.0-SNAPSHOT: Failed to collect dependencies at com.day.cq:cq-i18n:jar:5.4.4: Failed to read artifact descriptor for com.day.cq:cq-i18n:jar:5.4.4: Could not transfer artifact com.day.cq:cq-i18n:pom:5.4.4 from/to repo1 (http://HOST.COM/content/groups/public/): Connection to http://HOST.COM refused: Connection refused: connect
But on filesystem I see that this jar exists inside following folder:
.m2\repository\com\day\cq\cq-i18n\5.4.4
How to fix this problem?
update
Tried to execute with -o option:
Failed to execute goal on project XXXs: Could not resolve dependencies for project XXX:bundle:1.0.0-SNAPSHOT: Cannot access adobe (http://repo.adobe.com/nexus/content/groups/public/) in offline mode and the artifact com.day.cq:cq-i18n:jar:5.4.4 has not been downloaded from it before.
I was doing a build yesterday for the second time of an open source project (Saiku) – I have made no changes to the POM.XML or any of the libraries/jars. The build succeeded a few days ago but now fails. The following pastebin shows the output. The errors are of two types – failure to delete /clean project, and cannot find artifact. Does anyone have any troubleshooting tips?
http://pastebin.com/g2bpAtMS
error type 1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project saiku-core: Failed to clean project: Failed to delete /usr/local/.m2/repository/saiku/saiku-core/target/javadoc-bundle-options/javadoc-options-javadoc-resources.xml
error Type 2
- [ERROR] The build could not read 1 project -> [Help 1]
- [ERROR] The project org.saiku:saiku-webapp:2.2-SNAPSHOT (/usr/local/.m2/repository/saiku/saiku-webapp/pom.xml) has 1 error
- [ERROR] Non-resolvable parent POM: Could not find artifact org.saiku:saiku-core:pom:2.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM # line 3, column 10 -> [Help 2]
Are you building within your local repo? That would be bad.
I get similar errors because, I think, my virus checker locks a file underneath the target/ directory and clean cannot delete the directory. I delete the directory manually and resume the build.
Failed to delete /usr/local/.m2/repository/saiku/saiku-core/target/javadoc-bundle-options/javadoc-options-javadoc-resources.xml
You have locked this file. Close every program which could have opened it.
Failed to delete /usr/local/.m2/repository/saiku/saiku-ui/target/classes/routers/QueryRouter.js
Idem for this file.
/usr/local/.m2/repository/saiku/saiku-server/target/saiku-server-foodmart-2.2-SNAPSHOT.tar.gz
Idem for this file.
Could not find artifact org.saiku:saiku-core:pom:2.2-SNAPSHOT and 'parent.relativePath' points at wrong local POM
It seems you have changed something : Maven does not find the parent pom referenced by relativePath attribute.
Check these errors, you always many errors.
I've fixed that by setting relativePath in pom.xml of saiku-webapp:
<parent>
<artifactId>saiku-core</artifactId>
<groupId>org.saiku</groupId>
<version>2.6-SNAPSHOT</version>
<relativePath>../saiku-core/pom.xml</relativePath>
</parent>