0

I'm trying to add the web3j library ( version 5.0.0 ) into the generated .jar of a java project, but for some reason I keep getting the error :

Failed to parse plugin descriptor for org.web3j:core:5.0.0 (C:\Users\...\.m2\repository\org\web3j\core\5.0.0\core-5.0.0.jar): No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]

( Tried different versions , same error )

The pom.xml file content is the following :

<?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>BMarketMC-v2</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot-api</artifactId>
        <version>1.16.4-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.web3j</groupId>
        <artifactId>core</artifactId>
        <version>4.8.4</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.web3j</groupId>
            <artifactId>core</artifactId>
            <version>5.0.0</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.16.4-R0.1-SNAPSHOT</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

</project>

This error occurs when I run the package operation of the lifecycle , e.g : enter image description here

Where exactly should be this META-INF folder? Because it's not in the project directory.

Please some help, any idea how can I fix this?

TylerH
  • 20,799
  • 66
  • 75
  • 101
DIIMIIM
  • 557
  • 7
  • 28

1 Answers1

0

I'm not sure how much is this gonna help but I've solved my problem by giving up on using maven and add it as jar to project modules.

DIIMIIM
  • 557
  • 7
  • 28