#Compiling error while there is literally no code in plugin

1 messages · Page 1 of 1 (latest)

coarse osprey
#

I'm trying to do a simple plugin (I follow a tutorial for that) and when packagin, I get this error:

Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:helpmojo (help-goal) on project QuakePlugin: Execution help-goal of goal org.apache.maven.plugins:maven-plugin-plugin:3.2:helpmojo failed: Index 30059 out of bounds for length 335

What is happening and can I do to make this work please ? Any help will be much appreciated 🙂

crude sable
#

the hell is in your pom.xml

coarse osprey
#

122 lines, what part do you want ?

crude sable
#

all 122

coarse osprey
#

Intellij tells me there are 2 errors at lines 90 and 91

crude sable
#

thats in code you dont have access to

#

at least my guess is

#

send the tutorial you are following

#

because idk why theres random plugins in here

crude sable
#

uhm?

#

where did you get

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <goalPrefix>QuakePlugin</goalPrefix>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.7</version>
            <configuration>
              <debug>true</debug>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <goals>
                <goal>clean</goal>
                <goal>test-compile</goal>
              </goals>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
#

from

coarse osprey
#

It was from the creation of the project by Intellij

crude sable
#

delete that bullshit

coarse osprey
#

All ?

crude sable
coarse osprey
#

Another error:

Source option 5 is no longer supported. Use 7 or later.

Language level is invalid or missing in pom.xml. Current project JDK is 19. Specify language level in QuakePlugin Maven Plugin

I feel like I can arrange this one 🙂

#

I didn't do anything and got another error when trying to package:

Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.2:descriptor
#

I added

<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>2.0</version>
      </plugin>
    </plugins>
  </build>

in my pom.xml and I get:

Here is my code:

package me.awild.quake;

import org.bukkit.plugin.java.JavaPlugin;
public class MainPlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        getLogger().info("onEnable is called!");
    }
    @Override
    public void onDisable() {
        getLogger().info("onDisable is called!");
    }
}

crude sable
#

send entire pom again

coarse osprey
crude sable
#

ehm

#

is there nothing else with that error

coarse osprey
#

Literaly nothing else

crude sable
#

mate u are a magnet for trouble

#

i dont get it

#

what is

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>2.0</version>
      </plugin>
#

where'd u get that from

coarse osprey
#

I get that because I got another error

#

And when reasearching, I added that code snipet that arranges the error

#

The error before adding the pugin part is this one:

crude sable
#

mate what the fuck dependencies are u adding

#
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.2</version>
      <scope>provided</scope>
    </dependency>
coarse osprey
#

tbh, idk, the dependencies part was added by default when creating the project

crude sable
#

u definitely did not create the project using the right settings

#

literally none of this shouldve been here

#

did u add plexus-utils yourself

coarse osprey
#

no

#

I created the project with Intellij

#

Do I have to do this with eclipse ?

crude sable
#

absolutely not

#

IntelliJ creation works fine

#

u just did it wrong

coarse osprey
#

ok !

crude sable
#

lmao

coarse osprey
#

bruh

#

Index 9322 out of bounds for length 103

#

like, lmao

#

oh wait, leme try something

#

doesn't work bruh

crude sable
#

bro what

#

oh my god lmfao

#

you've got the damned packaging set as maven-plugin

coarse osprey
#

You know what, i'll try with Eclipse

#

society batman

crude sable
#

no stop

#

mate

coarse osprey
#

lmao

crude sable
#

you definitely used the wrong IntelliJ generator

#

it was trying to make you code a maven plugin

coarse osprey
#

ooooh

#

DUDE

#

i'm such a dumbass

crude sable
#

could be

#

but good luck on the journey of programming spigot plugins xd

coarse osprey
#

Basicaly, I selected "Marven Archetype" fot my project, but there is a "Minecraft" -> bukkit option in Intellij

#

LMAOOOOO

#

Anyways, thank you very much for all the help gigachad 😄