admin管理员组文章数量:1434966
I get this error when trying to run mvnd clean install:
[ERROR] The project com.exmpale:my-project:SP-21.053.00_-SNAPSHOT (/home/username/IdeaProjects/my-project/pom.xml) has 1 error
[ERROR] Non-resolvable import POM: The following artifacts could not be resolved: .assertj:assertj-bom:pom:3.25.0 (absent): Could not transfer artifact .assertj:assertj-bom:pom:3.25.0 from/to public (
/repository/public/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target @ line 5739, column 19 -> [Help 2]
I was able to resolve it for maven by adding .mvn/jvm.config in project root:
-Dmaven.wagon.http.ssl.ignore.validity.dates=true
-Dmaven.wagon.http.ssl.allowall=true
-Dmaven.wagon.http.ssl.insecure=true
For mvnd I tried adding these properties to:
settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation=".0.0 .0.0.xsd" xmlns=".0.0" xmlns:xsi=";>
<localRepository>/home/username/.m2/repository</localRepository>
<profiles>
<profile>
<id>default</id>
<properties>
<maven.wagon.http.ssl.allowall>true</maven.wagon.http.ssl.allowall>
<maven.wagon.http.ssl.insecure>true</maven.wagon.http.ssl.insecure>
<maven.wagon.http.ssl.ignore.validity.dates>true</maven.wagon.http.ssl.ignore.validity.dates>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<!-- other tags are omitted -->
</settings>
.mvn/maven.config in project root:
-Dmaven.wagon.http.ssl.ignore.validity.dates=true
-Dmaven.wagon.http.ssl.allowall=true
-Dmaven.wagon.http.ssl.insecure=true
.mvnd.properties in jvmArgs property:
mvnd.jvmArgs=-Dmaven.wagon.http.ssl.ignore.validity.dates=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.insecure=true
and passing them through terminal:
mvnd clean install -Dmaven.wagon.http.ssl.ignore.validity.dates=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.insecure=true
But nothing helped.
mvn --version
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /opt/apache-maven-3.8.8
Java version: 1.8.0_282, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/jdk8u282-b08/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.7.1-amd64", arch: "amd64", family: "unix"
mvnd --version
Apache Maven Daemon (mvnd) 1.0.2 linux-amd64 native client (cccc1ec8a5b741c62b29f9fb04d37b1678a029bb)
Terminal: .jline.terminal.impl.PosixSysTerminal with pty .jline.terminal.impl.jni.linux.LinuxNativePty
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /home/username/maven-mvnd-1.0.2-linux-amd64/mvn
Java version: 1.8.0_282, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/jdk8u282-b08/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.7.1-amd64", arch: "amd64", family: "unix"
I get this error when trying to run mvnd clean install:
[ERROR] The project com.exmpale:my-project:SP-21.053.00_-SNAPSHOT (/home/username/IdeaProjects/my-project/pom.xml) has 1 error
[ERROR] Non-resolvable import POM: The following artifacts could not be resolved: .assertj:assertj-bom:pom:3.25.0 (absent): Could not transfer artifact .assertj:assertj-bom:pom:3.25.0 from/to public (https://nexus-ci
/repository/public/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target @ line 5739, column 19 -> [Help 2]
I was able to resolve it for maven by adding .mvn/jvm.config in project root:
-Dmaven.wagon.http.ssl.ignore.validity.dates=true
-Dmaven.wagon.http.ssl.allowall=true
-Dmaven.wagon.http.ssl.insecure=true
For mvnd I tried adding these properties to:
settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache./SETTINGS/1.0.0 http://maven.apache./xsd/settings-1.0.0.xsd" xmlns="http://maven.apache./SETTINGS/1.0.0" xmlns:xsi="http://www.w3./2001/XMLSchema-instance">
<localRepository>/home/username/.m2/repository</localRepository>
<profiles>
<profile>
<id>default</id>
<properties>
<maven.wagon.http.ssl.allowall>true</maven.wagon.http.ssl.allowall>
<maven.wagon.http.ssl.insecure>true</maven.wagon.http.ssl.insecure>
<maven.wagon.http.ssl.ignore.validity.dates>true</maven.wagon.http.ssl.ignore.validity.dates>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<!-- other tags are omitted -->
</settings>
.mvn/maven.config in project root:
-Dmaven.wagon.http.ssl.ignore.validity.dates=true
-Dmaven.wagon.http.ssl.allowall=true
-Dmaven.wagon.http.ssl.insecure=true
.mvnd.properties in jvmArgs property:
mvnd.jvmArgs=-Dmaven.wagon.http.ssl.ignore.validity.dates=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.insecure=true
and passing them through terminal:
mvnd clean install -Dmaven.wagon.http.ssl.ignore.validity.dates=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.insecure=true
But nothing helped.
mvn --version
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: /opt/apache-maven-3.8.8
Java version: 1.8.0_282, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/jdk8u282-b08/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.7.1-amd64", arch: "amd64", family: "unix"
mvnd --version
Apache Maven Daemon (mvnd) 1.0.2 linux-amd64 native client (cccc1ec8a5b741c62b29f9fb04d37b1678a029bb)
Terminal: .jline.terminal.impl.PosixSysTerminal with pty .jline.terminal.impl.jni.linux.LinuxNativePty
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /home/username/maven-mvnd-1.0.2-linux-amd64/mvn
Java version: 1.8.0_282, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/jdk8u282-b08/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.7.1-amd64", arch: "amd64", family: "unix"
Share
Improve this question
edited Nov 19, 2024 at 3:56
Aleksey
asked Nov 18, 2024 at 10:03
AlekseyAleksey
32 bronze badges
2
- 1 Where have you put them? Please show your setup? – khmarbaise Commented Nov 18, 2024 at 11:24
- @khmarbaise Thanks for answering, I've updated the question – Aleksey Commented Nov 19, 2024 at 3:51
1 Answer
Reset to default 0I wasn't able to resolve the issue, but I found a workaround:
do
mvn clean install
to download all dependencies required to build the projectdo
mvnd -nsu -o clean install
to run mvnd in offline modeif you get errors indicating that some dependencies are missing, for example:
[ERROR] dependency: .mockito:mockito-core:jar:1.9.5 (provided)
[ERROR] Cannot access public (https://nexus-ci/repository/public/) in offline mode and the artifact .mockito:mockito-core:jar:1.9.5 has not been downloaded from it before.
just download required dependency:
mvn dependency:get -DgroupId=.mockito -DartifactId=mockito-core -Dversion=1.9.5
and do mvnd -nsu -o clean install
again
本文标签: How to specify maven properies when using mvndStack Overflow
版权声明:本文标题:How to specify maven properies when using mvnd? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745627946a2667089.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论