Maven (Java) does not build dependencies into a compiled file. Here is the code of my main class, the architecture of the application and the contents of the compiled file.
import club.minnced.discord.webhook.WebhookClientBuilder;
public class Main {
public static void main(String[] args) {
System.out.println("Hello!");
WebhookClientBuilder builder = new WebhookClientBuilder("test");
System.out.println(builder);
}
}
The rest:
I read the answers to the questions and ended up making a pom.xml file like this: 12345678901234567890123456789123456789023456789345678945678456789
<?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>me.gusandr</groupId>
<artifactId>GusStill</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>Main</mainClass>
</manifest>
</archive>
</configuration>
<dependencies>
<!-- https://mvnrepository.com/artifact/club.minnced/discord-webhooks -->
<dependency>
<groupId>club.minnced</groupId>
<artifactId>discord-webhooks</artifactId>
<version>0.8.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/club.minnced/discord-webhooks -->
<dependency>
<groupId>club.minnced</groupId>
<artifactId>discord-webhooks</artifactId>
<version>0.8.4</version>
</dependency>
</dependencies>
</project>
Error: enter image description here