NukkitX repository: dependency not found

Leonidius

Member
I'm trying to add NukkitX as a library to my plugin in IntelliJ IDEA, so i copied the code from this page and pasted it to my pom.xml file.
Code:
   <repositories>
       <repository>
           <id>nukkit-repo</id>
           <url>https://repo.nukkitx.com/snapshot</url>
       </repository>
   </repositories>

   <dependencies>
       <dependency>
           <groupId>cn.nukkit</groupId>
           <artifactId>nukkit</artifactId>
           <version>1.0-SNAPSHOT</version>
           <scope>provided</scope>
       </dependency>
   </dependencies>
But Intellij Idea says "dependency not found" and dependency's version (1.0-SNAPSHOT) is highlighted in red.

When I tried to build my project using mvn clean package it said:
Code:
[ERROR] Failed to execute goal on project trading.interface: Could not resolve dependencies for project ua.leonidius:trading.interface:jar:1.0-SNAPSHOT: Failed to collect
 dependencies at cn.nukkit:nukkit:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for cn.nukkit:nukkit:jar:1.0-SNAPSHOT: Could not transfer artifact cn.nukkit:nukkit
:pom:1.0-SNAPSHOT from/to nukkit-repo (https://repo.nukkitx.com/snapshot): Access denied to: https://repo.nukkitx.com/snapshot/cn/nukkit/nukkit/1.0-SNAPSHOT/nukkit-1.0-SN
APSHOT.pom , ReasonPhrase:Forbidden. -> [Help 1]
What should I do?
 

CreeperFace

🇨🇿🇺🇦 Слава Україні!
Staff member
I'm trying to add NukkitX as a library to my plugin in IntelliJ IDEA, so i copied the code from this page and pasted it to my pom.xml file.
Code:
   <repositories>
       <repository>
           <id>nukkit-repo</id>
           <url>https://repo.nukkitx.com/snapshot</url>
       </repository>
   </repositories>

   <dependencies>
       <dependency>
           <groupId>cn.nukkit</groupId>
           <artifactId>nukkit</artifactId>
           <version>1.0-SNAPSHOT</version>
           <scope>provided</scope>
       </dependency>
   </dependencies>
But Intellij Idea says "dependency not found" and dependency's version (1.0-SNAPSHOT) is highlighted in red.

When I tried to build my project using mvn clean package it said:
Code:
[ERROR] Failed to execute goal on project trading.interface: Could not resolve dependencies for project ua.leonidius:trading.interface:jar:1.0-SNAPSHOT: Failed to collect
 dependencies at cn.nukkit:nukkit:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for cn.nukkit:nukkit:jar:1.0-SNAPSHOT: Could not transfer artifact cn.nukkit:nukkit
:pom:1.0-SNAPSHOT from/to nukkit-repo (https://repo.nukkitx.com/snapshot): Access denied to: https://repo.nukkitx.com/snapshot/cn/nukkit/nukkit/1.0-SNAPSHOT/nukkit-1.0-SN
APSHOT.pom , ReasonPhrase:Forbidden. -> [Help 1]
What should I do?
Wrong repo. Take a look here
 

Leonidius

Member
It is the correct repo. The potestas.xyz domain is deprecated and will soon be removed.
https://repo.nukkitx.com/snapshot/cn/nukkit/nukkit/1.0-SNAPSHOT/
It's definitely there.
I actually tried this new repo and I'm getting the same result. But now my "<project" opening tag in pom.xml is highlighted in red and it says:
Code:
Failed to read artifact descriptor for cn.nukkit:nukkit:jar:1.0-SNAPSHOT
Dependency's version is highligted in red as well, just like before.
Also, when i try mvn package clean I get this:
Code:
[ERROR] Failed to execute goal on project essentialsui: Could not resolve dependencies for project ua.leonidius:essentialsui:jar:1.0-SNAPSHOT: Failed to collect dependenc
ies at cn.nukkit:nukkit:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for cn.nukkit:nukkit:jar:1.0-SNAPSHOT: Could not transfer artifact cn.nukkit:nukkit:pom:1.0-S
NAPSHOT from/to nukkitx (https://repo.nukkitx.com/snapshot/cn/nukkit/nukkit/1.0-SNAPSHOT/): Access denied to: https://repo.nukkitx.com/snapshot/cn/nukkit/nukkit/1.0-SNAPS
HOT/cn/nukkit/nukkit/1.0-SNAPSHOT/nukkit-1.0-SNAPSHOT.pom , ReasonPhrase:Forbidden. -> [Help 1]
This is what I've written in my pom.xml:
Code:
<repositories>
        <repository>
            <id>nukkitx</id>
            <name>NukkitX-snapshots</name>
            <url>https://repo.nukkitx.com/snapshot/cn/nukkit/nukkit/1.0-SNAPSHOT/</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>cn.nukkit</groupId>
            <artifactId>nukkit</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
 

SupremeMortal

Administrator
Staff member
This is the correct way

XML:
   <repositories>
        <repository>
            <id>nukkitx-repo</id>
            <url>https://repo.nukkitx.com/snapshot/<url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>cn.nukkit</groupId>
            <artifactId>nukkit</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
 

Leonidius

Member
This is the correct way

XML:
   <repositories>
        <repository>
            <id>nukkitx-repo</id>
            <url>https://repo.nukkitx.com/snapshot/<url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>cn.nukkit</groupId>
            <artifactId>nukkit</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
Now it works, thank you!
 
Top