【问题标题】:Discord JDA dependency missingDiscord JDA 依赖缺失
【发布时间】:2018-10-22 05:09:33
【问题描述】:

我正在尝试构建一个不和谐的应用程序,但由于某种原因它无法访问 JDA。这是错误:

The POM for net.dv8tion:JDA:jar:3.6.2_362 is missing, no dependency information available

编辑:这是我的 POM:

<?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>DiscordBot</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>net.dv8tion</groupId>
            <artifactId>JDA</artifactId>
            <version>3.6.2_362</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>jcenter</id>
            <name>jcenter-bintray</name>
            <url>http://jcenter.bintray.com</url>
        </repository>
    </repositories>
</project>

【问题讨论】:

  • 我们可以有你的 pom.xml 吗?
  • 我刚刚编辑它以包含 POM

标签: java maven pom.xml discord discord-jda


【解决方案1】:

根据JDA's README,目前的最新版本是3.6.0_362 而不是3.6.2_362,因此您可能需要更改它。

【讨论】:

    【解决方案2】:

    下面是一个示例 JDA maven pom 文件

    <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>DiscordBot</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>bot</name>
    <description>General purpose bot</description>
    <dependencies>
        <dependency>
            <groupId>net.dv8tion</groupId>
            <artifactId>JDA</artifactId>
            <version>3.6.0_362</version>
        </dependency>
        <dependency>
            <groupId>com.jagrosh</groupId>
            <artifactId>jda-utilities</artifactId>
            <version>2.1</version>
            <scope>compile</scope>
            <type>pom</type>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>jcenter</id>
            <name>jcenter-bintray</name>
            <url>http://jcenter.bintray.com</url>
        </repository>
        <repository>
            <id>central</id>
            <name>bintray</name>
            <url>http://jcenter.bintray.com</url>
        </repository>
    </repositories>
    

    【讨论】:

      【解决方案3】:

      你为什么要使用这么旧的版本?

      https://github.com/DV8FromTheWorld/JDAhttps://mvnrepository.com/artifact/net.dv8tion/JDA/5.0.0-alpha.3 的最新消息

      <dependency>
          <groupId>net.dv8tion</groupId>
          <artifactId>JDA</artifactId>
          <version>5.0.0-alpha.3</version>
      </dependency>
      

      【讨论】:

        猜你喜欢
        • 2016-07-04
        • 1970-01-01
        • 2021-10-15
        • 2019-05-26
        • 1970-01-01
        • 2013-07-06
        • 2021-04-24
        • 2023-01-05
        • 1970-01-01
        相关资源
        最近更新 更多