I'm trying to add JADE as a maven dependecy.
I added the repository and the property.
<repositories>
<repository>
<id>tilab</id>
<url>https://jade.tilab.com/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.tilab.jade</groupId>
<artifactId>jade</artifactId>
<version>4.6.0</version>
</dependency>
</dependencies>
Failed to execute goal on project jade: Could not resolve dependencies for project org.example:jade:jar:1.0-SNAPSHOT: Cannot access tilab (https://jade.tilab.com/maven/) in offline mode and the artifact com.tilab.jade:jade:j ar:4.6.0 has not been downloaded from it before
When I try to import the dependency, maven returns me:
unable to find valid certification path to requested target
~/.mavenrc
MAVEN_OPTS="-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true"
mvn clean package
├── pom.xml
└── src
└── main
└── java
└── org
└── example
└── Main.java
package org.example;
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>tmpmaven</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>tilab</id>
<url>https://jade.tilab.com/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.tilab.jade</groupId>
<artifactId>jade</artifactId>
<version>4.3.3</version>
</dependency>
</dependencies>
</project>
mvn clean ackage
$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.example:tmpmaven >------------------------
[INFO] Building tmpmaven 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from tilab: https://jade.tilab.com/maven/com/tilab/jade/jade/4.3.3/jade-4.3.3.jar
Downloaded from tilab: https://jade.tilab.com/maven/com/tilab/jade/jade/4.3.3/jade-4.3.3.jar (2.7 MB at 317 kB/s)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tmpmaven ---
[INFO]
[INFO] --- maven-
curl
download jade-4.6.0.pom
$ curl https://jade.tilab.com/maven/com/tilab/jade/jade/4.6.0/jade-4.6.0.pom
curl: (60) SSL certificate problem: unable to get local issuer certificate
...
Fail, Error message SSL certificate problem
$ curl -k https://jade.tilab.com/maven/com/tilab/jade/jade/4.6.0/jade-4.6.0.pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
...
Add -k
, to ignore SSL, it can success access.
How to tell Maven to disregard SSL errors (and trusting all certs)?
How to tell Maven to disregard SSL errors (and trusting all certs)?
Find answer.
mvn
command -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
I don't care why ssl have error, just skip ssl