Based on JMusicBot by jagrosh (https://github.com/jagrosh/MusicBot), via the maintained fork by arif-banai (https://github.com/arif-banai/MusicBot). See NOTICE for attribution. Licensed under Apache 2.0. YouTube-side changes had broken playback entirely. Fixes: - Apply the remote signature cipher independently of OAuth. Deciphering and authentication are unrelated, but the cipher was only configured when OAuth was enabled, so the default install fell back to the bundled extractor and failed with "Must find sig function from script: /s/player/<id>/...". Now always applied, and configurable via playback.youtube.remoteCipher.url. - Add the ANDROID client and order the client list by reliability. ANDROID is currently the only client YouTube reliably streams to anonymously. WEB moves last, as YouTube answers it with SABR-only responses carrying no playable format ("No supported audio streams available, available types:"). - Detect sign-in failures across the whole exception graph. The existing hint could never fire: it matched the aggregate AllClientsFailedException message rather than the per-client reasons, and compared against an ASCII apostrophe while YouTube sends U+2019. - Track youtube-source past 1.18.2, which predates the TV client User-Agent fix and the contentLength recovery fix. Measured on previously failing tracks: 5/5 playing, stable across repeat runs (was 1/5). No OAuth required. Adds 17 tests; 676 unit + 48 integration pass.
863 lines
38 KiB
XML
863 lines
38 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
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.arifbanai</groupId>
|
|
<artifactId>JMusicBot</artifactId>
|
|
<version>0.7.0</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>JMusicBot</name>
|
|
<description>A cross-platform Discord music bot with a clean interface</description>
|
|
<url>https://jmusicbot.com</url>
|
|
<inceptionYear>2017</inceptionYear>
|
|
|
|
<licenses>
|
|
<license>
|
|
<name>Apache License, Version 2.0</name>
|
|
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
|
|
<distribution>repo</distribution>
|
|
</license>
|
|
</licenses>
|
|
|
|
<organization>
|
|
<name>JMusicBot</name>
|
|
<url>https://jmusicbot.com</url>
|
|
</organization>
|
|
|
|
<developers>
|
|
<developer>
|
|
<id>jagrosh</id>
|
|
<name>John Grosh</name>
|
|
<url>https://github.com/jagrosh</url>
|
|
<roles>
|
|
<role>original author</role>
|
|
</roles>
|
|
</developer>
|
|
<developer>
|
|
<id>arif-banai</id>
|
|
<name>Arif Banai</name>
|
|
<url>https://github.com/arif-banai</url>
|
|
<roles>
|
|
<role>maintainer</role>
|
|
</roles>
|
|
</developer>
|
|
</developers>
|
|
|
|
<scm>
|
|
<connection>scm:git:https://github.com/arif-banai/MusicBot.git</connection>
|
|
<developerConnection>scm:git:[email protected]:arif-banai/MusicBot.git</developerConnection>
|
|
<url>https://github.com/arif-banai/MusicBot</url>
|
|
<tag>HEAD</tag>
|
|
</scm>
|
|
|
|
<issueManagement>
|
|
<system>GitHub Issues</system>
|
|
<url>https://github.com/arif-banai/MusicBot/issues</url>
|
|
</issueManagement>
|
|
|
|
<ciManagement>
|
|
<system>GitHub Actions</system>
|
|
<url>https://github.com/arif-banai/MusicBot/actions</url>
|
|
</ciManagement>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>dv8tion</id>
|
|
<name>m2-dv8tion</name>
|
|
<url>https://m2.dv8tion.net/releases</url>
|
|
</repository>
|
|
<repository>
|
|
<id>jitpack.io</id>
|
|
<url>https://jitpack.io</url>
|
|
<snapshots>
|
|
<enabled>true</enabled>
|
|
<updatePolicy>always</updatePolicy>
|
|
</snapshots>
|
|
</repository>
|
|
<repository>
|
|
<id>arbjergDev</id>
|
|
<name>Lavalink Repository</name>
|
|
<url>https://maven.lavalink.dev/releases</url>
|
|
</repository>
|
|
<repository>
|
|
<id>lavalinkSnapshots</id>
|
|
<name>Lavalink Snapshot Repository</name>
|
|
<url>https://maven.lavalink.dev/snapshots</url>
|
|
<snapshots>
|
|
<enabled>true</enabled>
|
|
</snapshots>
|
|
</repository>
|
|
<repository>
|
|
<id>chew</id>
|
|
<name>m2-chew</name>
|
|
<url>https://m2.chew.pro/releases</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<!-- Jackson BOM to align all Jackson modules -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson</groupId>
|
|
<artifactId>jackson-bom</artifactId>
|
|
<version>${jackson-bom.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<!-- JUnit BOM to align all JUnit modules -->
|
|
<dependency>
|
|
<groupId>org.junit</groupId>
|
|
<artifactId>junit-bom</artifactId>
|
|
<version>${junit-bom.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<!-- SLF4J API - resolves 1.7.36/2.0.7 vs 2.0.17 conflicts -->
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-api</artifactId>
|
|
<version>${slf4j.version}</version>
|
|
</dependency>
|
|
<!-- Kotlin stdlib - resolves 1.4.x/2.2.20 vs 2.2.21 conflicts -->
|
|
<dependency>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-stdlib</artifactId>
|
|
<version>${kotlin-stdlib.version}</version>
|
|
</dependency>
|
|
<!-- JetBrains annotations - resolves 13.0 vs 24.0.0 -->
|
|
<dependency>
|
|
<groupId>org.jetbrains</groupId>
|
|
<artifactId>annotations</artifactId>
|
|
<version>${jetbrains-annotations.version}</version>
|
|
</dependency>
|
|
<!-- org.json - resolves 20220320 vs 20240303 -->
|
|
<dependency>
|
|
<groupId>org.json</groupId>
|
|
<artifactId>json</artifactId>
|
|
<version>${org-json.version}</version>
|
|
</dependency>
|
|
<!-- jsoup - resolves 1.16.1 vs 1.22.1 -->
|
|
<dependency>
|
|
<groupId>org.jsoup</groupId>
|
|
<artifactId>jsoup</artifactId>
|
|
<version>${jsoup.version}</version>
|
|
</dependency>
|
|
<!-- Rhino engine - resolves 1.7.14 vs 1.7.15 -->
|
|
<dependency>
|
|
<groupId>org.mozilla</groupId>
|
|
<artifactId>rhino-engine</artifactId>
|
|
<version>${rhino-engine.version}</version>
|
|
</dependency>
|
|
<!-- lava-common - align to lavaplayer 2.2.7 -->
|
|
<dependency>
|
|
<groupId>dev.arbjerg</groupId>
|
|
<artifactId>lava-common</artifactId>
|
|
<version>${lava-common.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<dependencies>
|
|
<!-- Discord Dependencies -->
|
|
<dependency>
|
|
<groupId>net.dv8tion</groupId>
|
|
<artifactId>JDA</artifactId>
|
|
<version>${jda.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>pw.chew</groupId>
|
|
<artifactId>jda-chewtils</artifactId>
|
|
<version>${jda-chewtils.version}</version>
|
|
<scope>compile</scope>
|
|
<type>pom</type>
|
|
<exclusions>
|
|
<!-- Exclude ancient slf4j 1.7.x - we use 2.0.17 via logback -->
|
|
<exclusion>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-api</artifactId>
|
|
</exclusion>
|
|
<!-- Exclude ancient kotlin 1.4.x - incompatible with JDA's kotlin 2.x -->
|
|
<exclusion>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-stdlib</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-stdlib-common</artifactId>
|
|
</exclusion>
|
|
<!-- Exclude old okhttp 4.x - JDA uses okhttp 5.x -->
|
|
<exclusion>
|
|
<groupId>com.squareup.okhttp3</groupId>
|
|
<artifactId>okhttp</artifactId>
|
|
</exclusion>
|
|
<!-- Exclude old okio 2.x - JDA uses okio 3.x -->
|
|
<exclusion>
|
|
<groupId>com.squareup.okio</groupId>
|
|
<artifactId>okio</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<!-- DAVE Protocol Dependencies -->
|
|
<!-- https://github.com/MinnDevelopment/jdave -->
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>jdave-api</artifactId>
|
|
<version>${jdave.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>jdave-native-linux-x86-64</artifactId>
|
|
<version>${jdave.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>jdave-native-linux-aarch64</artifactId>
|
|
<version>${jdave.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>jdave-native-win-x86-64</artifactId>
|
|
<version>${jdave.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>jdave-native-darwin</artifactId>
|
|
<version>${jdave.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Native Audio Send (udpqueue) Dependencies -->
|
|
<!-- https://github.com/MinnDevelopment/udpqueue.rs -->
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-linux-x86-64</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-linux-x86</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-linux-aarch64</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-linux-arm</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-linux-musl-x86-64</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-linux-musl-aarch64</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-win-x86-64</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-win-x86</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-win-aarch64</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>club.minnced</groupId>
|
|
<artifactId>udpqueue-native-darwin</artifactId>
|
|
<version>${udpqueue.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Music Dependencies -->
|
|
<dependency>
|
|
<groupId>dev.arbjerg</groupId>
|
|
<artifactId>lavaplayer</artifactId>
|
|
<version>${lavaplayer.version}</version>
|
|
</dependency>
|
|
<!-- YouTube Source (lavalink-devs) - v2 module provides lavaplayer 2.x thumbnail clients -->
|
|
<dependency>
|
|
<groupId>dev.lavalink.youtube</groupId>
|
|
<artifactId>v2</artifactId>
|
|
<version>${youtube-source.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Dropping JLyrics since it is not being maintained / not working anymore -->
|
|
<!-- <dependency>
|
|
<groupId>com.github.jagrosh</groupId>
|
|
<artifactId>JLyrics</artifactId>
|
|
<version>master-SNAPSHOT</version>
|
|
</dependency> -->
|
|
|
|
<!-- Misc Internal Dependencies -->
|
|
<!-- Source: https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
|
|
<dependency>
|
|
<groupId>ch.qos.logback</groupId>
|
|
<artifactId>logback-classic</artifactId>
|
|
<version>${logback.version}</version>
|
|
</dependency>
|
|
<!-- Source: https://mvnrepository.com/artifact/com.typesafe/config -->
|
|
<dependency>
|
|
<groupId>com.typesafe</groupId>
|
|
<artifactId>config</artifactId>
|
|
<version>${typesafe-config.version}</version>
|
|
</dependency>
|
|
<!-- Source: https://mvnrepository.com/artifact/org.jsoup/jsoup -->
|
|
<!-- Version managed by dependencyManagement -->
|
|
<dependency>
|
|
<groupId>org.jsoup</groupId>
|
|
<artifactId>jsoup</artifactId>
|
|
</dependency>
|
|
<!-- Using Jackson (already included via JDA transitive dependency) to reduce shaded jar size -->
|
|
<!-- Source: https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
|
|
<!-- Version managed by jackson-bom in dependencyManagement -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
</dependency>
|
|
|
|
<!-- GUI Dependencies -->
|
|
<!-- FlatLaf Look and Feel - Modern flat Swing L&F -->
|
|
<!-- Source: https://github.com/JFormDesigner/FlatLaf -->
|
|
<dependency>
|
|
<groupId>com.formdev</groupId>
|
|
<artifactId>flatlaf</artifactId>
|
|
<version>${flatlaf.version}</version>
|
|
</dependency>
|
|
<!-- FlatLaf Extras - SVG icons, UI inspector, and more -->
|
|
<dependency>
|
|
<groupId>com.formdev</groupId>
|
|
<artifactId>flatlaf-extras</artifactId>
|
|
<version>${flatlaf.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Testing Dependencies -->
|
|
<!-- Version managed by junit-bom in dependencyManagement -->
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-core</artifactId>
|
|
<version>${mockito.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mockito</groupId>
|
|
<artifactId>mockito-junit-jupiter</artifactId>
|
|
<version>${mockito.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.hamcrest</groupId>
|
|
<artifactId>hamcrest-core</artifactId>
|
|
<version>${hamcrest.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.squareup.okhttp3</groupId>
|
|
<artifactId>mockwebserver</artifactId>
|
|
<version>5.3.2</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>${maven-compiler-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>${maven-jar-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<version>${maven-shade-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>${maven-surefire-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<version>${maven-surefire-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<version>${maven-enforcer-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<version>${maven-dependency-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>versions-maven-plugin</artifactId>
|
|
<version>${versions-maven-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
<version>${checkstyle-maven-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.github.spotbugs</groupId>
|
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
|
<version>${spotbugs-maven-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>${jacoco-maven-plugin.version}</version>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
<configuration>
|
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
|
<shadedClassifierName>All</shadedClassifierName>
|
|
<artifactSet>
|
|
<includes>
|
|
<include>*:*</include>
|
|
</includes>
|
|
</artifactSet>
|
|
<filters>
|
|
<!-- Keep native libraries intact -->
|
|
<filter>
|
|
<artifact>club.minnced:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
<!-- Keep classes that may be loaded via reflection -->
|
|
<filter>
|
|
<artifact>ch.qos.logback:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
<filter>
|
|
<artifact>org.slf4j:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
<!-- Keep FlatLaf resources intact (themes, properties, native libs) -->
|
|
<filter>
|
|
<artifact>com.formdev:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
</filters>
|
|
<transformers>
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
|
<resource>reference.conf</resource>
|
|
</transformer>
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
<manifestEntries>
|
|
<Main-Class>com.jagrosh.jmusicbot.JMusicBot</Main-Class>
|
|
<Specification-Title>${project.artifactId}</Specification-Title>
|
|
<Specification-Version>${project.version}</Specification-Version>
|
|
<Implementation-Title>${project.artifactId}</Implementation-Title>
|
|
<Implementation-Version>${project.version}</Implementation-Version>
|
|
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
|
|
</manifestEntries>
|
|
</transformer>
|
|
</transformers>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/unit/**/*Test.java</include>
|
|
<include>**/unit/**/*Tests.java</include>
|
|
</includes>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>integration-test</goal>
|
|
<goal>verify</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/integration/**/*Test.java</include>
|
|
<include>**/integration/**/*Tests.java</include>
|
|
<include>**/integration/**/*IT.java</include>
|
|
</includes>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<release>${maven.compiler.release}</release>
|
|
<showWarnings>true</showWarnings>
|
|
<showDeprecation>true</showDeprecation>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
|
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
|
|
</manifest>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>enforce-versions</id>
|
|
<goals>
|
|
<goal>enforce</goal>
|
|
</goals>
|
|
<configuration>
|
|
<rules>
|
|
<requireMavenVersion>
|
|
<version>[3.8.0,)</version>
|
|
</requireMavenVersion>
|
|
<requireJavaVersion>
|
|
<version>[25,)</version>
|
|
</requireJavaVersion>
|
|
<banDuplicatePomDependencyVersions/>
|
|
</rules>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<properties>
|
|
<!-- Build settings -->
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
<maven.compiler.source>25</maven.compiler.source>
|
|
<maven.compiler.target>25</maven.compiler.target>
|
|
<maven.compiler.release>25</maven.compiler.release>
|
|
|
|
<!-- Reproducible builds -->
|
|
<project.build.outputTimestamp>2026-07-14T05:29:10Z</project.build.outputTimestamp>
|
|
|
|
<!-- Dependency versions -->
|
|
<jda.version>6.4.2</jda.version>
|
|
<jda-chewtils.version>2.2.1</jda-chewtils.version>
|
|
<jdave.version>0.1.7</jdave.version>
|
|
<udpqueue.version>0.2.12</udpqueue.version>
|
|
<lavaplayer.version>2.2.7</lavaplayer.version>
|
|
<!-- Pinned to the current youtube-source main HEAD. 1.18.2 predates the fixes for
|
|
the TV client User-Agent ("The page needs to be reloaded") and for formats
|
|
that omit contentLength; no 1.18.3 has been released yet. -->
|
|
<youtube-source.version>f45bbb7aebfcbc1c553769e04af6cd43afa8b7c3-SNAPSHOT</youtube-source.version>
|
|
<logback.version>1.5.25</logback.version>
|
|
<typesafe-config.version>1.4.3</typesafe-config.version>
|
|
<jsoup.version>1.22.1</jsoup.version>
|
|
<mockito.version>5.21.0</mockito.version>
|
|
<hamcrest.version>3.0</hamcrest.version>
|
|
<flatlaf.version>3.7</flatlaf.version>
|
|
|
|
<!-- BOM versions -->
|
|
<jackson-bom.version>2.20.1</jackson-bom.version>
|
|
<junit-bom.version>5.14.2</junit-bom.version>
|
|
|
|
<!-- Managed dependency versions -->
|
|
<slf4j.version>2.0.17</slf4j.version>
|
|
<kotlin-stdlib.version>2.2.21</kotlin-stdlib.version>
|
|
<jetbrains-annotations.version>24.0.0</jetbrains-annotations.version>
|
|
<org-json.version>20240303</org-json.version>
|
|
<rhino-engine.version>1.7.15</rhino-engine.version>
|
|
<lava-common.version>2.2.7</lava-common.version>
|
|
|
|
<!-- Plugin versions -->
|
|
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
|
|
<maven-shade-plugin.version>3.6.1</maven-shade-plugin.version>
|
|
<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
|
|
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
|
|
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
|
|
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
|
|
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
|
|
<spotbugs-maven-plugin.version>4.9.3.0</spotbugs-maven-plugin.version>
|
|
<checkstyle-maven-plugin.version>3.6.0</checkstyle-maven-plugin.version>
|
|
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
|
|
</properties>
|
|
|
|
<profiles>
|
|
<!-- Code style enforcement profile -->
|
|
<profile>
|
|
<id>checkstyle</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
<configuration>
|
|
<configLocation>google_checks.xml</configLocation>
|
|
<consoleOutput>true</consoleOutput>
|
|
<failsOnError>true</failsOnError>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>checkstyle-check</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<!-- Static analysis profile -->
|
|
<profile>
|
|
<id>spotbugs</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>com.github.spotbugs</groupId>
|
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>spotbugs-check</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<!-- Test coverage profile -->
|
|
<profile>
|
|
<id>coverage</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>prepare-agent</id>
|
|
<goals>
|
|
<goal>prepare-agent</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>prepare-agent-integration</id>
|
|
<goals>
|
|
<goal>prepare-agent-integration</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>report</id>
|
|
<phase>test</phase>
|
|
<goals>
|
|
<goal>report</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>report-integration</id>
|
|
<phase>post-integration-test</phase>
|
|
<goals>
|
|
<goal>report-integration</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<!-- Dependency analysis profile -->
|
|
<profile>
|
|
<id>dependency-check</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>versions-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<!-- E2E test profile -->
|
|
<profile>
|
|
<id>e2e</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>e2e-tests</id>
|
|
<goals>
|
|
<goal>integration-test</goal>
|
|
<goal>verify</goal>
|
|
</goals>
|
|
<configuration>
|
|
<includes>
|
|
<include>**/e2e/**/*Test.java</include>
|
|
<include>**/e2e/**/*Tests.java</include>
|
|
<include>**/e2e/**/*IT.java</include>
|
|
</includes>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<!-- Docker build profile - excludes unnecessary platform-specific dependencies -->
|
|
<!-- Docker only needs linux-x86-64 and linux-aarch64 for amd64/arm64 platforms -->
|
|
<profile>
|
|
<id>docker</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>default</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
<configuration>
|
|
<shadedArtifactAttached>true</shadedArtifactAttached>
|
|
<shadedClassifierName>All</shadedClassifierName>
|
|
<artifactSet>
|
|
<includes>
|
|
<include>*:*</include>
|
|
</includes>
|
|
<!-- Exclude platform-specific dependencies not needed for Docker -->
|
|
<excludes>
|
|
<!-- jdave: exclude Windows and macOS -->
|
|
<exclude>club.minnced:jdave-native-win-x86-64</exclude>
|
|
<exclude>club.minnced:jdave-native-darwin</exclude>
|
|
<!-- udpqueue: exclude Windows, macOS, and unnecessary Linux variants -->
|
|
<exclude>club.minnced:udpqueue-native-win-x86-64</exclude>
|
|
<exclude>club.minnced:udpqueue-native-win-x86</exclude>
|
|
<exclude>club.minnced:udpqueue-native-win-aarch64</exclude>
|
|
<exclude>club.minnced:udpqueue-native-darwin</exclude>
|
|
<exclude>club.minnced:udpqueue-native-linux-x86</exclude>
|
|
<exclude>club.minnced:udpqueue-native-linux-arm</exclude>
|
|
<exclude>club.minnced:udpqueue-native-linux-musl-x86-64</exclude>
|
|
<exclude>club.minnced:udpqueue-native-linux-musl-aarch64</exclude>
|
|
</excludes>
|
|
</artifactSet>
|
|
<filters>
|
|
<!-- Keep native libraries intact -->
|
|
<filter>
|
|
<artifact>club.minnced:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
<!-- Keep classes that may be loaded via reflection -->
|
|
<filter>
|
|
<artifact>ch.qos.logback:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
<filter>
|
|
<artifact>org.slf4j:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
<!-- Keep FlatLaf resources intact (themes, properties, native libs) -->
|
|
<filter>
|
|
<artifact>com.formdev:*</artifact>
|
|
<includes>
|
|
<include>**</include>
|
|
</includes>
|
|
</filter>
|
|
</filters>
|
|
<transformers>
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
|
<resource>reference.conf</resource>
|
|
</transformer>
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
<manifestEntries>
|
|
<Main-Class>com.jagrosh.jmusicbot.JMusicBot</Main-Class>
|
|
<Specification-Title>${project.artifactId}</Specification-Title>
|
|
<Specification-Version>${project.version}</Specification-Version>
|
|
<Implementation-Title>${project.artifactId}</Implementation-Title>
|
|
<Implementation-Version>${project.version}</Implementation-Version>
|
|
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
|
|
</manifestEntries>
|
|
</transformer>
|
|
</transformers>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|