This is the POM file:

<?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>com.mycompany</groupId>
    <artifactId>MavenBackEndStructure</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.web3j</groupId>
            <artifactId>core</artifactId>
            <version>4.8.4</version>
        </dependency>
    </dependencies>

</project>

And this is my main class:

package com.mycompany.mavenbackendstructure;

import org.web3j.protocol.Web3j; //The Error is here
import org.web3j.protocol.http.HttpService; //And Here

public class Main {
    
    public static void main(String[] args){
        
        final Web3j client = new Web3j.build(
            new HttpService(
            url: "https://mainnet.infura.io/v3/435e21e85fd0498ea8fee6c77e0cc48f"
            )
        );
    }
}

I tried to search the dependency at the Maven repository but still couldn't find it, So I don't know what's the problem that making the main can't see these libraries if someone could help me.

Thanks in advance.

0

There are 0 answers