0

In my pom.xml file I'm having issues getting the fastboard integration (I am using Maven).

My pom:

<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>
                    <configuration>
                        <createDependencyReducedPom>false</createDependencyReducedPom>
                        <outputFile>C:\Users\brdwl\Desktop\Server - Plugin Test\plugins\MyFirstPlugin.jar</outputFile>
                    </configuration>
                </execution>
            </executions>
        </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>
            <configuration>
                <relocations>
                    <relocation>
                        <pattern>fr.mrmicky.fastboard</pattern>
                        <!-- Replace 'com.yourpackage' with the package of your plugin ! -->
                        <shadedPattern>com.FirstPlugin.fastboard</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
        </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.18.1-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>fr.mrmicky</groupId>
        <artifactId>fastboard</artifactId>
        <version>1.2.1</version>
    </dependency>
</dependencies>

For reference, here is the github page of what I'm trying to install.

When adding these details in the following turns red and says Dependency 'fr.mrmicky:fastboard:1.2.1' not found - EDIT - Added full console logs to the OP, it no longer shows up in red inside the pom, but still unable to access it.

I've confirmed that it is the correct version that is on the github.

<groupId>fr.mrmicky</groupId>
<artifactId>fastboard</artifactId>
<version>1.2.1</version>

Console output during the rebuild is this:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for FirstPlugin:FirstPlugin:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-shade-plugin @ line 49, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] ----------------------< FirstPlugin:FirstPlugin >-----------------------
[INFO] Building FirstPlugin 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ FirstPlugin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ FirstPlugin ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ FirstPlugin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ FirstPlugin ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ FirstPlugin ---
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ FirstPlugin ---
[INFO] Building jar: C:\Users\brdwl\IdeaProjects\MyFirstPlugin\target\FirstPlugin-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-shade-plugin:3.3.0:shade (default) @ FirstPlugin ---
[INFO] Including fr.mrmicky:fastboard:jar:1.2.1 in the shaded jar.
[WARNING] FirstPlugin-1.0-SNAPSHOT.jar, fastboard-1.2.1.jar define 1 overlapping resource: 
[WARNING]   - META-INF/MANIFEST.MF
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See https://maven.apache.org/plugins/maven-shade-plugin/
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ FirstPlugin ---
[INFO] Installing C:\Users\brdwl\IdeaProjects\MyFirstPlugin\target\FirstPlugin-1.0-SNAPSHOT.jar to C:\Users\brdwl\.m2\repository\FirstPlugin\FirstPlugin\1.0-SNAPSHOT\FirstPlugin-1.0-SNAPSHOT.jar
[INFO] Installing C:\Users\brdwl\IdeaProjects\MyFirstPlugin\pom.xml to C:\Users\brdwl\.m2\repository\FirstPlugin\FirstPlugin\1.0-SNAPSHOT\FirstPlugin-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.549 s
[INFO] Finished at: 2023-04-17T12:29:48+01:00
[INFO] ------------------------------------------------------------------------
Ben Walsh
  • 19
  • 1
  • 2

0 Answers0