Rapha149 / SignGUI

An api to get input text via a sign in Minecraft.
MIT License
35 stars 12 forks source link

Maven repository not found #7

Closed cmptrwhz closed 2 months ago

cmptrwhz commented 2 months ago

When I attempt to add your dependency to my project I am getting an error stating your groupId is not being found.

Rapha149 commented 2 months ago

Do you use Maven or Gradle? I have not much experience witih Gradle but I think if you use that you will have to add the Maven Central Repository to your project manually, if you use Maven it should be registered automatically.

If that's not the problem, I don't know what could be, the project is on Maven Central (Repository Path)

Perhaps you could share your pom.xml or gradle.build file?

cmptrwhz commented 2 months ago

pom.xml

<?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>org.cmptrwhz</groupId>
  <artifactId>DezoMarket</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>DezoMarket</name>

  <properties>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
  </build>

  <repositories>
      <repository>
          <id>spigotmc-repo</id>
          <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
      </repository>
      <repository>
          <id>sonatype</id>
          <url>https://oss.sonatype.org/content/groups/public/</url>
      </repository>
  </repositories>

  <dependencies>
      <dependency>
          <groupId>org.spigotmc</groupId>
          <artifactId>spigot-api</artifactId>
          <version>1.20.4-R0.1-SNAPSHOT</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>net.luckperms</groupId>
          <artifactId>api</artifactId>
          <version>5.4</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>de.rapha149.signgui</groupId>
          <artifactId>signgui</artifactId>
          <version>2.3.2</version>
      </dependency>
  </dependencies>
</project>
cmptrwhz commented 2 months ago

ugh not sure why the pom isn't showing correctly with the <> code function of this editor

Rapha149 commented 2 months ago

I edited your comment to make it look better, the trick is to use that symbol three times like this: ```pom

Code

```

Now your pom.xml does look good, do you get an error while compiling or do you get an error when the plugin is running on the server?

cmptrwhz commented 2 months ago

I am sorry there must have been a huge delay in IntelliJ resolving the dependency it is not showing as failed anymore. I added it an hour ago and now it shows as being found.

cmptrwhz commented 2 months ago

The error I was getting is when I added the dependency directly to my POM file. IntelliJ was stating it could not resolve it. But everything is ok as it now is showing as resolved. I did close IntelliJ and reopen it so maybe that forced it refresh itself and links?

Rapha149 commented 2 months ago

Well at least it's solved then :) If you change something in your pom.xml you need to tell IntelliJ to load the changes. You can do this by opening the Maven tab in the top right corner and clicking on the reload button:

explanation

cmptrwhz commented 2 months ago

Thank you very much for the information I will remember that for the future.