805
Comment:
|
1977
|
Deletions are marked like this. | Additions are marked like this. |
Line 19: | Line 19: |
== [MAVEN] Failed to execute goal [...] dependencies could not be resolved == {{{ Failed to execute goal [...] one of its dependencies could not be resolved [...] and the artifact XYZ has not been downloaded from it }}} This is a very common error message when you try to package Maven projects. There are multiple possible reasons for this error. 1. The build-dependency was not added to debian/control. How can you find out wheter a certain jar file is already packaged for Debian? Use [[https://codesearch.debian.net | codesearch.debian.net]] or search for packages on [[https://www.debian.org/distrib/packages]]. If in doubt ask for help on the debian-java mailing list. 2. Make sure that all submodules of a Maven project are added to your debian/*.poms file. If the artifact has not been packaged for Debian yet, it is often possible to just ignore a certain submodule. 3. Check if the Maven coordinates in upstream's pom.xml file match with Debian's system libraries. If they don't, then you must overwrite groupId/artifactId/version in debian/maven.rules, so that the build system can find them in Debian's local /usr/share/maven-repo directory. |
Translation(s): English
Contents
FAQ
How can I use a specific version of OpenJDK to build a package?
Instead of a build-dependency on default-jdk, you can build-depend on openjdk-8-jdk or openjdk-11-jdk. Then you have to make sure JAVA_HOME points to your specific version and not to the default one. You can achieve that by adding
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
to debian/rules in case you are building the package on amd64.
This is useful for debugging build failures with a non-default JDK. Not build-depending on default-jdk should be avoided though unless there is a very good reason. Otherwise it would make transitions to newer JDK versions more difficult.
[MAVEN] Failed to execute goal [...] dependencies could not be resolved
Failed to execute goal [...] one of its dependencies could not be resolved [...] and the artifact XYZ has not been downloaded from it
This is a very common error message when you try to package Maven projects. There are multiple possible reasons for this error.
The build-dependency was not added to debian/control. How can you find out wheter a certain jar file is already packaged for Debian? Use codesearch.debian.net or search for packages on https://www.debian.org/distrib/packages. If in doubt ask for help on the debian-java mailing list.
- Make sure that all submodules of a Maven project are added to your debian/*.poms file. If the artifact has not been packaged for Debian yet, it is often possible to just ignore a certain submodule.
- Check if the Maven coordinates in upstream's pom.xml file match with Debian's system libraries. If they don't, then you must overwrite groupId/artifactId/version in debian/maven.rules, so that the build system can find them in Debian's local /usr/share/maven-repo directory.