Maven repository issue

Discussion in 'Programming Help' started by ieti, Aug 1, 2018.

  1. ieti

    ieti New Member

    I'm trying to migrate a plugin for using WG/WE 7.0, but in sk89q repository there are no builds for it. I found another maven repository which provides them, but i run into an issue.

    # This one has the WG/WE dependencies

    http://maven.sk89q.com/repo/

    # This one has WE/WG 7.0 SNAPSHOT builds

    https://repo.codemc.org/repository/maven-public/

    Problem is when i try to build with the newer WG it tries to pull all dependencies and it seem it does not find
    bukkit 1.6.2-R0.1 even tho it is present in sk89q repository. I found that it tries to pull the below XML file (you can download jar without problems) and fails with HTTP error 500:

    http://maven.sk89q.com/repo/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml

    This makes the whole build fail, because of the missing dependency.

    If i add the dependency locally it builds successfully:

    mvn install:install-file -Dfile=bukkit-1.6.2-R0.1-20130804.014923-14.jar -DgroupId=org.bukkit -DartifactId=bukkit -Dversion=1.6.2-R0.1-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
    Last edited: Aug 2, 2018
  2. Schneidertm

    Schneidertm New Member

    http://maven.sk89q.com/repo/ does provide WG/WE 7 too. I would refrain from using thrid parties.
    Code (Text):
            <dependency>
                <groupId>com.sk89q.worldguard</groupId>
                <artifactId>worldguard-legacy</artifactId>
                <version>7.0.0-SNAPSHOT</version>
                <scope>provided</scope>
            </dependency>

    For the 1.6.2-R0.1 issue, deleting the .m2 folder in my home directory helped me out.
  3. ieti

    ieti New Member

    I already removed the codemc repo after WG 7 was added in sk89q repository.

    For now i workaround the failing build with the below:

    Code (Text):
           <dependency>
                <groupId>com.sk89q.worldguard</groupId>
                <artifactId>worldguard-legacy</artifactId>
                <version>7.0.0-SNAPSHOT</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.bukkit</groupId>
                        <artifactId>bukkit</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.bstats.bStats-Metrics</groupId>
                        <artifactId>bstats-bukkit</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>io.papermc</groupId>
                        <artifactId>paperlib</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
    It works but getting warnings in Maven:

    Code (Text):
    [WARNING] The POM for com.sk89q.lib:jlibnoise:jar:1.0.0 is missing, no dependency information available
    [WARNING] The POM for com.sk89q:dummypermscompat:jar:1.8 is missing, no dependency information available